diff options
Diffstat (limited to 'www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch')
| -rw-r--r-- | www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch | 307 |
1 files changed, 155 insertions, 152 deletions
diff --git a/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch b/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch index 18fc72a..855718c 100644 --- a/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch +++ b/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | --- chrome/browser/BUILD.gn.orig | 1 | --- a/chrome/browser/BUILD.gn |
| 2 | +++ chrome/browser/BUILD.gn | 2 | +++ b/chrome/browser/BUILD.gn |
| 3 | @@ -2195,7 +2195,6 @@ static_library("browser") { | 3 | @@ -2174,7 +2174,6 @@ static_library("browser") { |
| 4 | "//components/reputation/core:proto", | 4 | "//components/reputation/core:proto", |
| 5 | "//components/resources", | 5 | "//components/resources", |
| 6 | "//components/safe_browsing/content/browser", | 6 | "//components/safe_browsing/content/browser", |
| @@ -8,7 +8,7 @@ | |||
| 8 | "//components/safe_browsing/content/browser:safe_browsing_service", | 8 | "//components/safe_browsing/content/browser:safe_browsing_service", |
| 9 | "//components/safe_browsing/content/browser/password_protection", | 9 | "//components/safe_browsing/content/browser/password_protection", |
| 10 | "//components/safe_browsing/content/browser/web_ui", | 10 | "//components/safe_browsing/content/browser/web_ui", |
| 11 | @@ -3706,8 +3705,6 @@ static_library("browser") { | 11 | @@ -3719,8 +3718,6 @@ static_library("browser") { |
| 12 | "download/download_commands.h", | 12 | "download/download_commands.h", |
| 13 | "download/download_crx_util.cc", | 13 | "download/download_crx_util.cc", |
| 14 | "download/download_crx_util.h", | 14 | "download/download_crx_util.h", |
| @@ -17,9 +17,9 @@ | |||
| 17 | "download/download_dir_policy_handler.cc", | 17 | "download/download_dir_policy_handler.cc", |
| 18 | "download/download_dir_policy_handler.h", | 18 | "download/download_dir_policy_handler.h", |
| 19 | "download/download_dir_util.cc", | 19 | "download/download_dir_util.cc", |
| 20 | --- chrome/browser/browser_process.h.orig | 20 | --- a/chrome/browser/browser_process.h |
| 21 | +++ chrome/browser/browser_process.h | 21 | +++ b/chrome/browser/browser_process.h |
| 22 | @@ -55,10 +55,6 @@ class NetworkQualityTracker; | 22 | @@ -54,10 +54,6 @@ class NetworkQualityTracker; |
| 23 | class SharedURLLoaderFactory; | 23 | class SharedURLLoaderFactory; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| @@ -30,7 +30,7 @@ | |||
| 30 | namespace subresource_filter { | 30 | namespace subresource_filter { |
| 31 | class RulesetService; | 31 | class RulesetService; |
| 32 | } | 32 | } |
| 33 | @@ -218,9 +214,6 @@ class BrowserProcess { | 33 | @@ -210,9 +206,6 @@ class BrowserProcess { |
| 34 | // on this platform (or this is a unit test). | 34 | // on this platform (or this is a unit test). |
| 35 | virtual StatusTray* status_tray() = 0; | 35 | virtual StatusTray* status_tray() = 0; |
| 36 | 36 | ||
| @@ -40,8 +40,8 @@ | |||
| 40 | // Returns the service providing versioned storage for rules used by the Safe | 40 | // Returns the service providing versioned storage for rules used by the Safe |
| 41 | // Browsing subresource filter. | 41 | // Browsing subresource filter. |
| 42 | virtual subresource_filter::RulesetService* | 42 | virtual subresource_filter::RulesetService* |
| 43 | --- chrome/browser/browser_process_impl.cc.orig | 43 | --- a/chrome/browser/browser_process_impl.cc |
| 44 | +++ chrome/browser/browser_process_impl.cc | 44 | +++ b/chrome/browser/browser_process_impl.cc |
| 45 | @@ -70,7 +70,6 @@ | 45 | @@ -70,7 +70,6 @@ |
| 46 | #include "chrome/browser/printing/print_preview_dialog_controller.h" | 46 | #include "chrome/browser/printing/print_preview_dialog_controller.h" |
| 47 | #include "chrome/browser/profiles/profile_manager.h" | 47 | #include "chrome/browser/profiles/profile_manager.h" |
| @@ -50,7 +50,7 @@ | |||
| 50 | #include "chrome/browser/shell_integration.h" | 50 | #include "chrome/browser/shell_integration.h" |
| 51 | #include "chrome/browser/site_isolation/prefs_observer.h" | 51 | #include "chrome/browser/site_isolation/prefs_observer.h" |
| 52 | #include "chrome/browser/ssl/secure_origin_prefs_observer.h" | 52 | #include "chrome/browser/ssl/secure_origin_prefs_observer.h" |
| 53 | @@ -395,8 +394,6 @@ void BrowserProcessImpl::StartTearDown() | 53 | @@ -393,8 +392,6 @@ void BrowserProcessImpl::StartTearDown() |
| 54 | 54 | ||
| 55 | metrics_services_manager_.reset(); | 55 | metrics_services_manager_.reset(); |
| 56 | intranet_redirect_detector_.reset(); | 56 | intranet_redirect_detector_.reset(); |
| @@ -59,7 +59,7 @@ | |||
| 59 | network_time_tracker_.reset(); | 59 | network_time_tracker_.reset(); |
| 60 | #if BUILDFLAG(ENABLE_PLUGINS) | 60 | #if BUILDFLAG(ENABLE_PLUGINS) |
| 61 | plugins_resource_service_.reset(); | 61 | plugins_resource_service_.reset(); |
| 62 | @@ -1030,14 +1027,6 @@ StatusTray* BrowserProcessImpl::status_t | 62 | @@ -1028,14 +1025,6 @@ StatusTray* BrowserProcessImpl::status_t |
| 63 | return status_tray_.get(); | 63 | return status_tray_.get(); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -74,7 +74,7 @@ | |||
| 74 | subresource_filter::RulesetService* | 74 | subresource_filter::RulesetService* |
| 75 | BrowserProcessImpl::subresource_filter_ruleset_service() { | 75 | BrowserProcessImpl::subresource_filter_ruleset_service() { |
| 76 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); | 76 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| 77 | @@ -1300,26 +1289,6 @@ void BrowserProcessImpl::CreateBackgroun | 77 | @@ -1280,26 +1269,6 @@ void BrowserProcessImpl::CreateBackgroun |
| 78 | #endif | 78 | #endif |
| 79 | } | 79 | } |
| 80 | 80 | ||
| @@ -101,17 +101,17 @@ | |||
| 101 | void BrowserProcessImpl::CreateSubresourceFilterRulesetService() { | 101 | void BrowserProcessImpl::CreateSubresourceFilterRulesetService() { |
| 102 | DCHECK(!subresource_filter_ruleset_service_); | 102 | DCHECK(!subresource_filter_ruleset_service_); |
| 103 | created_subresource_filter_ruleset_service_ = true; | 103 | created_subresource_filter_ruleset_service_ = true; |
| 104 | --- chrome/browser/browser_process_impl.h.orig | 104 | --- a/chrome/browser/browser_process_impl.h |
| 105 | +++ chrome/browser/browser_process_impl.h | 105 | +++ b/chrome/browser/browser_process_impl.h |
| 106 | @@ -190,7 +190,6 @@ class BrowserProcessImpl : public Browse | 106 | @@ -189,7 +189,6 @@ class BrowserProcessImpl : public Browse |
| 107 | std::unique_ptr<BackgroundModeManager> manager) override; | 107 | std::unique_ptr<BackgroundModeManager> manager) override; |
| 108 | #endif | 108 | #endif |
| 109 | StatusTray* status_tray() override; | 109 | StatusTray* status_tray() override; |
| 110 | - safe_browsing::SafeBrowsingService* safe_browsing_service() override; | 110 | - safe_browsing::SafeBrowsingService* safe_browsing_service() override; |
| 111 | subresource_filter::RulesetService* subresource_filter_ruleset_service() | 111 | subresource_filter::RulesetService* subresource_filter_ruleset_service() |
| 112 | override; | 112 | override; |
| 113 | federated_learning::FlocSortingLshClustersService* | 113 | |
| 114 | @@ -344,9 +343,6 @@ class BrowserProcessImpl : public Browse | 114 | @@ -336,9 +335,6 @@ class BrowserProcessImpl : public Browse |
| 115 | std::unique_ptr<BackgroundModeManager> background_mode_manager_; | 115 | std::unique_ptr<BackgroundModeManager> background_mode_manager_; |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| @@ -121,17 +121,17 @@ | |||
| 121 | bool created_subresource_filter_ruleset_service_ = false; | 121 | bool created_subresource_filter_ruleset_service_ = false; |
| 122 | std::unique_ptr<subresource_filter::RulesetService> | 122 | std::unique_ptr<subresource_filter::RulesetService> |
| 123 | subresource_filter_ruleset_service_; | 123 | subresource_filter_ruleset_service_; |
| 124 | --- chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc.orig | 124 | --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc |
| 125 | +++ chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc | 125 | +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc |
| 126 | @@ -70,7 +70,6 @@ | 126 | @@ -63,7 +63,6 @@ |
| 127 | #include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h" | ||
| 128 | #include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h" | ||
| 127 | #include "chrome/browser/profiles/profile.h" | 129 | #include "chrome/browser/profiles/profile.h" |
| 128 | #include "chrome/browser/profiles/profile_keep_alive_types.h" | ||
| 129 | #include "chrome/browser/profiles/scoped_profile_keep_alive.h" | ||
| 130 | -#include "chrome/browser/safe_browsing/safe_browsing_service.h" | 130 | -#include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 131 | #include "chrome/browser/search_engines/template_url_service_factory.h" | 131 | #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 132 | #include "chrome/browser/share/share_history.h" | 132 | #include "chrome/browser/share/share_history.h" |
| 133 | #include "chrome/browser/share/share_ranking.h" | 133 | #include "chrome/browser/share/share_ranking.h" |
| 134 | @@ -643,10 +642,6 @@ void ChromeBrowsingDataRemoverDelegate:: | 134 | @@ -617,10 +616,6 @@ void ChromeBrowsingDataRemoverDelegate:: |
| 135 | base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); | 135 | base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); |
| 136 | 136 | ||
| 137 | network::mojom::NetworkContext* safe_browsing_context = nullptr; | 137 | network::mojom::NetworkContext* safe_browsing_context = nullptr; |
| @@ -140,11 +140,11 @@ | |||
| 140 | - if (sb_service) | 140 | - if (sb_service) |
| 141 | - safe_browsing_context = sb_service->GetNetworkContext(profile_); | 141 | - safe_browsing_context = sb_service->GetNetworkContext(profile_); |
| 142 | 142 | ||
| 143 | browsing_data::RemoveEmbedderCookieData( | 143 | if (!filter_builder->IsCrossSiteClearSiteData()) { |
| 144 | delete_begin, delete_end, filter_builder, host_content_settings_map_, | 144 | browsing_data::RemoveEmbedderCookieData( |
| 145 | --- chrome/browser/chrome_content_browser_client.cc.orig | 145 | --- a/chrome/browser/chrome_content_browser_client.cc |
| 146 | +++ chrome/browser/chrome_content_browser_client.cc | 146 | +++ b/chrome/browser/chrome_content_browser_client.cc |
| 147 | @@ -921,34 +921,6 @@ void SetApplicationLocaleOnIOThread(cons | 147 | @@ -950,34 +950,6 @@ void SetApplicationLocaleOnIOThread(cons |
| 148 | GetIOThreadApplicationLocale() = locale; | 148 | GetIOThreadApplicationLocale() = locale; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| @@ -173,13 +173,13 @@ | |||
| 173 | - } | 173 | - } |
| 174 | - | 174 | - |
| 175 | - private: | 175 | - private: |
| 176 | - CertificateReportingService* service_; | 176 | - raw_ptr<CertificateReportingService> service_; |
| 177 | -}; | 177 | -}; |
| 178 | - | 178 | - |
| 179 | #if BUILDFLAG(ENABLE_EXTENSIONS) | 179 | #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 180 | 180 | ||
| 181 | AppLoadedInTabSource ClassifyAppLoadedInTabSource( | 181 | AppLoadedInTabSource ClassifyAppLoadedInTabSource( |
| 182 | @@ -1423,7 +1395,6 @@ void ChromeContentBrowserClient::PostAft | 182 | @@ -1465,7 +1437,6 @@ void ChromeContentBrowserClient::PostAft |
| 183 | InitNetworkContextsParentDirectory(); | 183 | InitNetworkContextsParentDirectory(); |
| 184 | 184 | ||
| 185 | DCHECK_CURRENTLY_ON(BrowserThread::UI); | 185 | DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| @@ -187,7 +187,7 @@ | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | bool ChromeContentBrowserClient::IsBrowserStartupComplete() { | 189 | bool ChromeContentBrowserClient::IsBrowserStartupComplete() { |
| 190 | @@ -4229,7 +4200,7 @@ ChromeContentBrowserClient::CreateThrott | 190 | @@ -4279,7 +4250,7 @@ ChromeContentBrowserClient::CreateThrott |
| 191 | content::WebContents* web_contents = handle->GetWebContents(); | 191 | content::WebContents* web_contents = handle->GetWebContents(); |
| 192 | throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>( | 192 | throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>( |
| 193 | handle, | 193 | handle, |
| @@ -196,7 +196,7 @@ | |||
| 196 | base::BindOnce(&HandleSSLErrorWrapper), base::BindOnce(&IsInHostedApp), | 196 | base::BindOnce(&HandleSSLErrorWrapper), base::BindOnce(&IsInHostedApp), |
| 197 | base::BindOnce( | 197 | base::BindOnce( |
| 198 | &ShouldIgnoreSslInterstitialBecauseNavigationDefaultedToHttps))); | 198 | &ShouldIgnoreSslInterstitialBecauseNavigationDefaultedToHttps))); |
| 199 | @@ -4258,15 +4229,6 @@ ChromeContentBrowserClient::CreateThrott | 199 | @@ -4314,16 +4285,6 @@ ChromeContentBrowserClient::CreateThrott |
| 200 | &throttles); | 200 | &throttles); |
| 201 | #endif | 201 | #endif |
| 202 | 202 | ||
| @@ -205,15 +205,16 @@ | |||
| 205 | - g_browser_process->safe_browsing_service() | 205 | - g_browser_process->safe_browsing_service() |
| 206 | - ? g_browser_process->safe_browsing_service()->ui_manager().get() | 206 | - ? g_browser_process->safe_browsing_service()->ui_manager().get() |
| 207 | - : nullptr; | 207 | - : nullptr; |
| 208 | - throttles.push_back( | 208 | - MaybeAddThrottle( |
| 209 | - std::make_unique<safe_browsing::SafeBrowsingNavigationThrottle>( | 209 | - safe_browsing::SafeBrowsingNavigationThrottle::MaybeCreateThrottleFor( |
| 210 | - handle, ui_manager)); | 210 | - handle, ui_manager), |
| 211 | - &throttles); | ||
| 211 | - | 212 | - |
| 212 | if (base::FeatureList::IsEnabled(safe_browsing::kDelayedWarnings)) { | 213 | if (base::FeatureList::IsEnabled(safe_browsing::kDelayedWarnings)) { |
| 213 | throttles.push_back( | 214 | throttles.push_back( |
| 214 | std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>( | 215 | std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>( |
| 215 | --- chrome/browser/component_updater/file_type_policies_component_installer.cc.orig | 216 | --- a/chrome/browser/component_updater/file_type_policies_component_installer.cc |
| 216 | +++ chrome/browser/component_updater/file_type_policies_component_installer.cc | 217 | +++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc |
| 217 | @@ -40,20 +40,6 @@ const uint8_t kFileTypePoliciesPublicKey | 218 | @@ -40,20 +40,6 @@ const uint8_t kFileTypePoliciesPublicKey |
| 218 | const char kFileTypePoliciesManifestName[] = "File Type Policies"; | 219 | const char kFileTypePoliciesManifestName[] = "File Type Policies"; |
| 219 | 220 | ||
| @@ -235,9 +236,9 @@ | |||
| 235 | } | 236 | } |
| 236 | 237 | ||
| 237 | } // namespace | 238 | } // namespace |
| 238 | --- chrome/browser/download/chrome_download_manager_delegate.cc.orig | 239 | --- a/chrome/browser/download/chrome_download_manager_delegate.cc |
| 239 | +++ chrome/browser/download/chrome_download_manager_delegate.cc | 240 | +++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
| 240 | @@ -436,13 +436,6 @@ ChromeDownloadManagerDelegate::~ChromeDo | 241 | @@ -431,13 +431,6 @@ ChromeDownloadManagerDelegate::~ChromeDo |
| 241 | 242 | ||
| 242 | void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) { | 243 | void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) { |
| 243 | download_manager_ = dm; | 244 | download_manager_ = dm; |
| @@ -250,15 +251,16 @@ | |||
| 250 | - } | 251 | - } |
| 251 | } | 252 | } |
| 252 | 253 | ||
| 253 | #if defined(OS_ANDROID) | 254 | #if BUILDFLAG(IS_ANDROID) |
| 254 | @@ -791,16 +784,6 @@ void ChromeDownloadManagerDelegate::Choo | 255 | @@ -791,17 +784,6 @@ void ChromeDownloadManagerDelegate::Choo |
| 255 | |||
| 256 | void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName( | 256 | void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName( |
| 257 | base::FilePath* filename) { | 257 | base::FilePath* filename, |
| 258 | const GURL& source_url) { | ||
| 258 | - safe_browsing::FileTypePolicies* file_type_policies = | 259 | - safe_browsing::FileTypePolicies* file_type_policies = |
| 259 | - safe_browsing::FileTypePolicies::GetInstance(); | 260 | - safe_browsing::FileTypePolicies::GetInstance(); |
| 260 | - | 261 | - |
| 261 | - if (file_type_policies->GetFileDangerLevel(*filename) == | 262 | - const PrefService* prefs = profile_->GetPrefs(); |
| 263 | - if (file_type_policies->GetFileDangerLevel(*filename, source_url, prefs) == | ||
| 262 | - safe_browsing::DownloadFileType::NOT_DANGEROUS) | 264 | - safe_browsing::DownloadFileType::NOT_DANGEROUS) |
| 263 | - return; | 265 | - return; |
| 264 | - | 266 | - |
| @@ -268,9 +270,9 @@ | |||
| 268 | } | 270 | } |
| 269 | 271 | ||
| 270 | void ChromeDownloadManagerDelegate::SanitizeDownloadParameters( | 272 | void ChromeDownloadManagerDelegate::SanitizeDownloadParameters( |
| 271 | --- chrome/browser/download/download_item_model.cc.orig | 273 | --- a/chrome/browser/download/download_item_model.cc |
| 272 | +++ chrome/browser/download/download_item_model.cc | 274 | +++ b/chrome/browser/download/download_item_model.cc |
| 273 | @@ -86,7 +86,7 @@ class DownloadItemModelData : public bas | 275 | @@ -87,7 +87,7 @@ class DownloadItemModelData : public bas |
| 274 | 276 | ||
| 275 | // Danger level of the file determined based on the file type and whether | 277 | // Danger level of the file determined based on the file type and whether |
| 276 | // there was a user action associated with the download. | 278 | // there was a user action associated with the download. |
| @@ -279,7 +281,7 @@ | |||
| 279 | 281 | ||
| 280 | // Whether the download is currently being revived. | 282 | // Whether the download is currently being revived. |
| 281 | bool is_being_revived_; | 283 | bool is_being_revived_; |
| 282 | @@ -123,7 +123,7 @@ DownloadItemModelData::DownloadItemModel | 284 | @@ -124,7 +124,7 @@ DownloadItemModelData::DownloadItemModel |
| 283 | : should_show_in_shelf_(true), | 285 | : should_show_in_shelf_(true), |
| 284 | was_ui_notified_(false), | 286 | was_ui_notified_(false), |
| 285 | should_prefer_opening_in_browser_(false), | 287 | should_prefer_opening_in_browser_(false), |
| @@ -288,7 +290,7 @@ | |||
| 288 | is_being_revived_(false) {} | 290 | is_being_revived_(false) {} |
| 289 | 291 | ||
| 290 | } // namespace | 292 | } // namespace |
| 291 | @@ -381,13 +381,13 @@ void DownloadItemModel::SetShouldPreferO | 293 | @@ -382,13 +382,13 @@ void DownloadItemModel::SetShouldPreferO |
| 292 | data->should_prefer_opening_in_browser_ = preference; | 294 | data->should_prefer_opening_in_browser_ = preference; |
| 293 | } | 295 | } |
| 294 | 296 | ||
| @@ -305,7 +307,7 @@ | |||
| 305 | DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_); | 307 | DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_); |
| 306 | data->danger_level_ = danger_level; | 308 | data->danger_level_ = danger_level; |
| 307 | } | 309 | } |
| 308 | @@ -599,9 +599,6 @@ bool DownloadItemModel::IsCommandEnabled | 310 | @@ -604,9 +604,6 @@ bool DownloadItemModel::IsCommandEnabled |
| 309 | // filename. Don't base an "Always open" decision based on it. Also | 311 | // filename. Don't base an "Always open" decision based on it. Also |
| 310 | // exclude extensions. | 312 | // exclude extensions. |
| 311 | return download_->CanOpenDownload() && | 313 | return download_->CanOpenDownload() && |
| @@ -315,9 +317,9 @@ | |||
| 315 | !download_crx_util::IsExtensionDownload(*download_); | 317 | !download_crx_util::IsExtensionDownload(*download_); |
| 316 | case DownloadCommands::PAUSE: | 318 | case DownloadCommands::PAUSE: |
| 317 | return !download_->IsSavePackageDownload() && | 319 | return !download_->IsSavePackageDownload() && |
| 318 | --- chrome/browser/download/download_prefs.cc.orig | 320 | --- a/chrome/browser/download/download_prefs.cc |
| 319 | +++ chrome/browser/download/download_prefs.cc | 321 | +++ b/chrome/browser/download/download_prefs.cc |
| 320 | @@ -260,14 +260,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr | 322 | @@ -251,14 +251,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr |
| 321 | base::FilePath::StringType(1, base::FilePath::kExtensionSeparator) + | 323 | base::FilePath::StringType(1, base::FilePath::kExtensionSeparator) + |
| 322 | extension); | 324 | extension); |
| 323 | 325 | ||
| @@ -333,7 +335,7 @@ | |||
| 333 | } | 335 | } |
| 334 | } | 336 | } |
| 335 | 337 | ||
| 336 | @@ -475,10 +468,6 @@ bool DownloadPrefs::IsAutoOpenByPolicy(c | 338 | @@ -466,10 +459,6 @@ bool DownloadPrefs::IsAutoOpenByPolicy(c |
| 337 | bool DownloadPrefs::EnableAutoOpenByUserBasedOnExtension( | 339 | bool DownloadPrefs::EnableAutoOpenByUserBasedOnExtension( |
| 338 | const base::FilePath& file_name) { | 340 | const base::FilePath& file_name) { |
| 339 | base::FilePath::StringType extension = file_name.Extension(); | 341 | base::FilePath::StringType extension = file_name.Extension(); |
| @@ -344,9 +346,9 @@ | |||
| 344 | 346 | ||
| 345 | DCHECK(extension[0] == base::FilePath::kExtensionSeparator); | 347 | DCHECK(extension[0] == base::FilePath::kExtensionSeparator); |
| 346 | extension.erase(0, 1); | 348 | extension.erase(0, 1); |
| 347 | --- chrome/browser/download/download_target_determiner.cc.orig | 349 | --- a/chrome/browser/download/download_target_determiner.cc |
| 348 | +++ chrome/browser/download/download_target_determiner.cc | 350 | +++ b/chrome/browser/download/download_target_determiner.cc |
| 349 | @@ -297,13 +297,6 @@ base::FilePath DownloadTargetDeterminer: | 351 | @@ -298,13 +298,6 @@ base::FilePath DownloadTargetDeterminer: |
| 350 | download_->GetURL(), download_->GetContentDisposition(), referrer_charset, | 352 | download_->GetURL(), download_->GetContentDisposition(), referrer_charset, |
| 351 | suggested_filename, sniffed_mime_type, default_filename); | 353 | suggested_filename, sniffed_mime_type, default_filename); |
| 352 | 354 | ||
| @@ -360,13 +362,14 @@ | |||
| 360 | // If no mime type or explicitly specified a name, don't replace file | 362 | // If no mime type or explicitly specified a name, don't replace file |
| 361 | // extension. | 363 | // extension. |
| 362 | if (sniffed_mime_type.empty() || !suggested_filename.empty()) | 364 | if (sniffed_mime_type.empty() || !suggested_filename.empty()) |
| 363 | @@ -1113,29 +1106,7 @@ DownloadFileType::DangerLevel DownloadTa | 365 | @@ -1111,30 +1104,7 @@ DownloadFileType::DangerLevel DownloadTa |
| 364 | download_->HasUserGesture()) | 366 | download_->HasUserGesture()) |
| 365 | return DownloadFileType::NOT_DANGEROUS; | 367 | return DownloadFileType::NOT_DANGEROUS; |
| 366 | 368 | ||
| 367 | - DownloadFileType::DangerLevel danger_level = | 369 | - DownloadFileType::DangerLevel danger_level = |
| 368 | - safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel( | 370 | - safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel( |
| 369 | - virtual_path_.BaseName()); | 371 | - virtual_path_.BaseName(), download_->GetURL(), |
| 372 | - GetProfile()->GetPrefs()); | ||
| 370 | - | 373 | - |
| 371 | - // A danger level of ALLOW_ON_USER_GESTURE is used to label potentially | 374 | - // A danger level of ALLOW_ON_USER_GESTURE is used to label potentially |
| 372 | - // dangerous file types that have a high frequency of legitimate use. We would | 375 | - // dangerous file types that have a high frequency of legitimate use. We would |
| @@ -391,8 +394,8 @@ | |||
| 391 | } | 394 | } |
| 392 | 395 | ||
| 393 | absl::optional<base::Time> | 396 | absl::optional<base::Time> |
| 394 | --- chrome/browser/extensions/api/downloads/downloads_api.cc.orig | 397 | --- a/chrome/browser/extensions/api/downloads/downloads_api.cc |
| 395 | +++ chrome/browser/extensions/api/downloads/downloads_api.cc | 398 | +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc |
| 396 | @@ -36,7 +36,6 @@ | 399 | @@ -36,7 +36,6 @@ |
| 397 | #include "chrome/browser/browser_process.h" | 400 | #include "chrome/browser/browser_process.h" |
| 398 | #include "chrome/browser/download/download_core_service.h" | 401 | #include "chrome/browser/download/download_core_service.h" |
| @@ -455,10 +458,10 @@ | |||
| 455 | } | 458 | } |
| 456 | 459 | ||
| 457 | DownloadsShowFunction::DownloadsShowFunction() {} | 460 | DownloadsShowFunction::DownloadsShowFunction() {} |
| 458 | --- chrome/browser/extensions/api/downloads/downloads_api.h.orig | 461 | --- a/chrome/browser/extensions/api/downloads/downloads_api.h |
| 459 | +++ chrome/browser/extensions/api/downloads/downloads_api.h | 462 | +++ b/chrome/browser/extensions/api/downloads/downloads_api.h |
| 460 | @@ -13,7 +13,6 @@ | 463 | @@ -13,7 +13,6 @@ |
| 461 | #include "base/macros.h" | 464 | #include "base/memory/raw_ptr.h" |
| 462 | #include "base/scoped_observation.h" | 465 | #include "base/scoped_observation.h" |
| 463 | #include "base/time/time.h" | 466 | #include "base/time/time.h" |
| 464 | -#include "chrome/browser/download/download_danger_prompt.h" | 467 | -#include "chrome/browser/download/download_danger_prompt.h" |
| @@ -493,8 +496,8 @@ | |||
| 493 | }; | 496 | }; |
| 494 | 497 | ||
| 495 | class DownloadsShowFunction : public ExtensionFunction { | 498 | class DownloadsShowFunction : public ExtensionFunction { |
| 496 | --- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc.orig | 499 | --- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc |
| 497 | +++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc | 500 | +++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc |
| 498 | @@ -54,38 +54,7 @@ SafeBrowsingPrivateGetReferrerChainFunct | 501 | @@ -54,38 +54,7 @@ SafeBrowsingPrivateGetReferrerChainFunct |
| 499 | base::StringPrintf("Could not find tab with id %d.", params->tab_id))); | 502 | base::StringPrintf("Could not find tab with id %d.", params->tab_id))); |
| 500 | } | 503 | } |
| @@ -534,9 +537,9 @@ | |||
| 534 | return RespondNow(ArgumentList( | 537 | return RespondNow(ArgumentList( |
| 535 | api::safe_browsing_private::GetReferrerChain::Results::Create( | 538 | api::safe_browsing_private::GetReferrerChain::Results::Create( |
| 536 | referrer_entries))); | 539 | referrer_entries))); |
| 537 | --- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig | 540 | --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| 538 | +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc | 541 | +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| 539 | @@ -683,18 +683,6 @@ void WebstorePrivateBeginInstallWithMani | 542 | @@ -716,18 +716,6 @@ void WebstorePrivateBeginInstallWithMani |
| 540 | 543 | ||
| 541 | void WebstorePrivateBeginInstallWithManifest3Function:: | 544 | void WebstorePrivateBeginInstallWithManifest3Function:: |
| 542 | ReportFrictionAcceptedEvent() { | 545 | ReportFrictionAcceptedEvent() { |
| @@ -555,7 +558,7 @@ | |||
| 555 | } | 558 | } |
| 556 | 559 | ||
| 557 | void WebstorePrivateBeginInstallWithManifest3Function::OnInstallPromptDone( | 560 | void WebstorePrivateBeginInstallWithManifest3Function::OnInstallPromptDone( |
| 558 | @@ -1159,52 +1147,9 @@ WebstorePrivateGetReferrerChainFunction: | 561 | @@ -1192,52 +1180,9 @@ WebstorePrivateGetReferrerChainFunction: |
| 559 | 562 | ||
| 560 | ExtensionFunction::ResponseAction | 563 | ExtensionFunction::ResponseAction |
| 561 | WebstorePrivateGetReferrerChainFunction::Run() { | 564 | WebstorePrivateGetReferrerChainFunction::Run() { |
| @@ -609,9 +612,9 @@ | |||
| 609 | } | 612 | } |
| 610 | 613 | ||
| 611 | WebstorePrivateGetExtensionStatusFunction:: | 614 | WebstorePrivateGetExtensionStatusFunction:: |
| 612 | --- chrome/browser/extensions/blocklist_state_fetcher.cc.orig | 615 | --- a/chrome/browser/extensions/blocklist_state_fetcher.cc |
| 613 | +++ chrome/browser/extensions/blocklist_state_fetcher.cc | 616 | +++ b/chrome/browser/extensions/blocklist_state_fetcher.cc |
| 614 | @@ -34,33 +34,8 @@ BlocklistStateFetcher::~BlocklistStateFe | 617 | @@ -38,23 +38,8 @@ BlocklistStateFetcher::~BlocklistStateFe |
| 615 | void BlocklistStateFetcher::Request(const std::string& id, | 618 | void BlocklistStateFetcher::Request(const std::string& id, |
| 616 | RequestCallback callback) { | 619 | RequestCallback callback) { |
| 617 | DCHECK_CURRENTLY_ON(BrowserThread::UI); | 620 | DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| @@ -631,23 +634,13 @@ | |||
| 631 | - if (request_already_sent) | 634 | - if (request_already_sent) |
| 632 | - return; | 635 | - return; |
| 633 | - | 636 | - |
| 634 | - if (g_browser_process && g_browser_process->safe_browsing_service()) { | ||
| 635 | - if (base::FeatureList::IsEnabled( | ||
| 636 | - safe_browsing::kSafeBrowsingRemoveCookies)) { | ||
| 637 | - url_loader_factory_ = g_browser_process->shared_url_loader_factory(); | ||
| 638 | - } else { | ||
| 639 | - url_loader_factory_ = | ||
| 640 | - g_browser_process->safe_browsing_service()->GetURLLoaderFactory(); | ||
| 641 | - } | ||
| 642 | - } | ||
| 643 | - | ||
| 644 | - SendRequest(id); | 637 | - SendRequest(id); |
| 645 | + base::ThreadTaskRunnerHandle::Get()->PostTask( | 638 | + base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 646 | + FROM_HERE, base::BindOnce(std::move(callback), BLOCKLISTED_UNKNOWN)); | 639 | + FROM_HERE, base::BindOnce(std::move(callback), BLOCKLISTED_UNKNOWN)); |
| 647 | } | 640 | } |
| 648 | 641 | ||
| 649 | void BlocklistStateFetcher::SendRequest(const std::string& id) { | 642 | void BlocklistStateFetcher::SendRequest(const std::string& id) { |
| 650 | @@ -71,8 +46,7 @@ void BlocklistStateFetcher::SendRequest( | 643 | @@ -65,8 +50,7 @@ void BlocklistStateFetcher::SendRequest( |
| 651 | std::string request_str; | 644 | std::string request_str; |
| 652 | request.SerializeToString(&request_str); | 645 | request.SerializeToString(&request_str); |
| 653 | 646 | ||
| @@ -657,7 +650,7 @@ | |||
| 657 | net::NetworkTrafficAnnotationTag traffic_annotation = | 650 | net::NetworkTrafficAnnotationTag traffic_annotation = |
| 658 | net::DefineNetworkTrafficAnnotation("extension_blacklist", R"( | 651 | net::DefineNetworkTrafficAnnotation("extension_blacklist", R"( |
| 659 | semantics { | 652 | semantics { |
| 660 | @@ -122,12 +96,6 @@ void BlocklistStateFetcher::SendRequest( | 653 | @@ -114,12 +98,6 @@ void BlocklistStateFetcher::SendRequest( |
| 661 | base::Unretained(this), fetcher)); | 654 | base::Unretained(this), fetcher)); |
| 662 | } | 655 | } |
| 663 | 656 | ||
| @@ -670,9 +663,9 @@ | |||
| 670 | void BlocklistStateFetcher::OnURLLoaderComplete( | 663 | void BlocklistStateFetcher::OnURLLoaderComplete( |
| 671 | network::SimpleURLLoader* url_loader, | 664 | network::SimpleURLLoader* url_loader, |
| 672 | std::unique_ptr<std::string> response_body) { | 665 | std::unique_ptr<std::string> response_body) { |
| 673 | --- chrome/browser/extensions/blocklist_state_fetcher.h.orig | 666 | --- a/chrome/browser/extensions/blocklist_state_fetcher.h |
| 674 | +++ chrome/browser/extensions/blocklist_state_fetcher.h | 667 | +++ b/chrome/browser/extensions/blocklist_state_fetcher.h |
| 675 | @@ -37,8 +37,6 @@ class BlocklistStateFetcher { | 668 | @@ -36,8 +36,6 @@ class BlocklistStateFetcher { |
| 676 | 669 | ||
| 677 | virtual void Request(const std::string& id, RequestCallback callback); | 670 | virtual void Request(const std::string& id, RequestCallback callback); |
| 678 | 671 | ||
| @@ -681,7 +674,7 @@ | |||
| 681 | protected: | 674 | protected: |
| 682 | void OnURLLoaderComplete(network::SimpleURLLoader* url_loader, | 675 | void OnURLLoaderComplete(network::SimpleURLLoader* url_loader, |
| 683 | std::unique_ptr<std::string> response_body); | 676 | std::unique_ptr<std::string> response_body); |
| 684 | @@ -57,7 +55,6 @@ class BlocklistStateFetcher { | 677 | @@ -56,7 +54,6 @@ class BlocklistStateFetcher { |
| 685 | 678 | ||
| 686 | void SendRequest(const std::string& id); | 679 | void SendRequest(const std::string& id); |
| 687 | 680 | ||
| @@ -689,20 +682,20 @@ | |||
| 689 | scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; | 682 | scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; |
| 690 | 683 | ||
| 691 | // SimpleURLLoader -> (owned loader, extension id). | 684 | // SimpleURLLoader -> (owned loader, extension id). |
| 692 | --- chrome/browser/metrics/chrome_metrics_service_client.cc.orig | 685 | --- a/chrome/browser/metrics/chrome_metrics_service_client.cc |
| 693 | +++ chrome/browser/metrics/chrome_metrics_service_client.cc | 686 | +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc |
| 694 | @@ -828,9 +828,6 @@ void ChromeMetricsServiceClient::Registe | 687 | @@ -856,9 +856,6 @@ void ChromeMetricsServiceClient::Registe |
| 695 | metrics_service_->RegisterMetricsProvider( | 688 | metrics_service_->RegisterMetricsProvider( |
| 696 | std::make_unique<HttpsEngagementMetricsProvider>()); | 689 | std::make_unique<HttpsEngagementMetricsProvider>()); |
| 697 | 690 | ||
| 698 | - metrics_service_->RegisterMetricsProvider( | 691 | - metrics_service_->RegisterMetricsProvider( |
| 699 | - std::make_unique<CertificateReportingMetricsProvider>()); | 692 | - std::make_unique<CertificateReportingMetricsProvider>()); |
| 700 | - | 693 | - |
| 701 | #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) | 694 | #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) |
| 702 | metrics_service_->RegisterMetricsProvider( | 695 | metrics_service_->RegisterMetricsProvider( |
| 703 | std::make_unique<UpgradeMetricsProvider>()); | 696 | std::make_unique<UpgradeMetricsProvider>()); |
| 704 | --- chrome/browser/net/trial_comparison_cert_verifier_controller.cc.orig | 697 | --- a/chrome/browser/net/trial_comparison_cert_verifier_controller.cc |
| 705 | +++ chrome/browser/net/trial_comparison_cert_verifier_controller.cc | 698 | +++ b/chrome/browser/net/trial_comparison_cert_verifier_controller.cc |
| 706 | @@ -138,9 +138,6 @@ void TrialComparisonCertVerifierControll | 699 | @@ -138,9 +138,6 @@ void TrialComparisonCertVerifierControll |
| 707 | std::string serialized_report; | 700 | std::string serialized_report; |
| 708 | if (!report.Serialize(&serialized_report)) | 701 | if (!report.Serialize(&serialized_report)) |
| @@ -713,19 +706,19 @@ | |||
| 713 | } | 706 | } |
| 714 | 707 | ||
| 715 | // static | 708 | // static |
| 716 | --- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig | 709 | --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc |
| 717 | +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc | 710 | +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc |
| 718 | @@ -297,7 +297,6 @@ void ChromeBrowserMainExtraPartsProfiles | 711 | @@ -317,7 +317,6 @@ void ChromeBrowserMainExtraPartsProfiles |
| 719 | #if BUILDFLAG(IS_CHROMEOS_LACROS) | 712 | #if BUILDFLAG(IS_CHROMEOS_LACROS) |
| 720 | CertDbInitializerFactory::GetInstance(); | 713 | CertDbInitializerFactory::GetInstance(); |
| 721 | #endif | 714 | #endif |
| 722 | - CertificateReportingServiceFactory::GetInstance(); | 715 | - CertificateReportingServiceFactory::GetInstance(); |
| 723 | #if !defined(OS_ANDROID) | 716 | #if !BUILDFLAG(IS_ANDROID) |
| 724 | ChromeBrowsingDataLifetimeManagerFactory::GetInstance(); | 717 | ChromeBrowsingDataLifetimeManagerFactory::GetInstance(); |
| 725 | #endif | 718 | #endif |
| 726 | --- chrome/browser/profiles/profile_impl.cc.orig | 719 | --- a/chrome/browser/profiles/profile_impl.cc |
| 727 | +++ chrome/browser/profiles/profile_impl.cc | 720 | +++ b/chrome/browser/profiles/profile_impl.cc |
| 728 | @@ -93,7 +93,6 @@ | 721 | @@ -94,7 +94,6 @@ |
| 729 | #include "chrome/browser/profiles/profile_metrics.h" | 722 | #include "chrome/browser/profiles/profile_metrics.h" |
| 730 | #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 723 | #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
| 731 | #include "chrome/browser/push_messaging/push_messaging_service_impl.h" | 724 | #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
| @@ -733,7 +726,7 @@ | |||
| 733 | #include "chrome/browser/sessions/exit_type_service.h" | 726 | #include "chrome/browser/sessions/exit_type_service.h" |
| 734 | #include "chrome/browser/sharing/sharing_service_factory.h" | 727 | #include "chrome/browser/sharing/sharing_service_factory.h" |
| 735 | #include "chrome/browser/signin/identity_manager_factory.h" | 728 | #include "chrome/browser/signin/identity_manager_factory.h" |
| 736 | @@ -627,17 +626,6 @@ void ProfileImpl::LoadPrefsForNormalStar | 729 | @@ -621,17 +620,6 @@ void ProfileImpl::LoadPrefsForNormalStar |
| 737 | 730 | ||
| 738 | mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate> | 731 | mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate> |
| 739 | pref_validation_delegate; | 732 | pref_validation_delegate; |
| @@ -751,9 +744,9 @@ | |||
| 751 | 744 | ||
| 752 | prefs_ = | 745 | prefs_ = |
| 753 | CreatePrefService(pref_registry_, CreateExtensionPrefStore(this, false), | 746 | CreatePrefService(pref_registry_, CreateExtensionPrefStore(this, false), |
| 754 | --- chrome/browser/profiles/profiles_state.cc.orig | 747 | --- a/chrome/browser/profiles/profiles_state.cc |
| 755 | +++ chrome/browser/profiles/profiles_state.cc | 748 | +++ b/chrome/browser/profiles/profiles_state.cc |
| 756 | @@ -259,9 +259,6 @@ void RemoveBrowsingDataForProfile(const | 749 | @@ -255,9 +255,6 @@ void RemoveBrowsingDataForProfile(const |
| 757 | // The BrowsingDataRemover relies on many objects that aren't created in unit | 750 | // The BrowsingDataRemover relies on many objects that aren't created in unit |
| 758 | // tests. Previously this code would depend on content::ResourceDispatcherHost | 751 | // tests. Previously this code would depend on content::ResourceDispatcherHost |
| 759 | // but that's gone, so do a similar hack for now. | 752 | // but that's gone, so do a similar hack for now. |
| @@ -763,8 +756,8 @@ | |||
| 763 | Profile* profile = | 756 | Profile* profile = |
| 764 | g_browser_process->profile_manager()->GetProfileByPath(profile_path); | 757 | g_browser_process->profile_manager()->GetProfileByPath(profile_path); |
| 765 | if (!profile) | 758 | if (!profile) |
| 766 | --- chrome/browser/safe_browsing/BUILD.gn.orig | 759 | --- a/chrome/browser/safe_browsing/BUILD.gn |
| 767 | +++ chrome/browser/safe_browsing/BUILD.gn | 760 | +++ b/chrome/browser/safe_browsing/BUILD.gn |
| 768 | @@ -5,6 +5,7 @@ import("//components/safe_browsing/build | 761 | @@ -5,6 +5,7 @@ import("//components/safe_browsing/build |
| 769 | import("//extensions/buildflags/buildflags.gni") | 762 | import("//extensions/buildflags/buildflags.gni") |
| 770 | 763 | ||
| @@ -773,7 +766,7 @@ | |||
| 773 | sources = [ | 766 | sources = [ |
| 774 | "chrome_controller_client.cc", | 767 | "chrome_controller_client.cc", |
| 775 | "chrome_controller_client.h", | 768 | "chrome_controller_client.h", |
| 776 | @@ -88,6 +89,7 @@ static_library("safe_browsing") { | 769 | @@ -89,6 +90,7 @@ static_library("safe_browsing") { |
| 777 | "//extensions/browser", | 770 | "//extensions/browser", |
| 778 | ] | 771 | ] |
| 779 | } | 772 | } |
| @@ -781,7 +774,7 @@ | |||
| 781 | 774 | ||
| 782 | if (safe_browsing_mode != 0) { | 775 | if (safe_browsing_mode != 0) { |
| 783 | # "Safe Browsing Basic" files used for safe browsing in full mode | 776 | # "Safe Browsing Basic" files used for safe browsing in full mode |
| 784 | @@ -411,6 +413,7 @@ static_library("advanced_protection") { | 777 | @@ -446,6 +448,7 @@ static_library("advanced_protection") { |
| 785 | } | 778 | } |
| 786 | 779 | ||
| 787 | source_set("metrics_collector") { | 780 | source_set("metrics_collector") { |
| @@ -789,7 +782,7 @@ | |||
| 789 | sources = [ | 782 | sources = [ |
| 790 | "safe_browsing_metrics_collector_factory.cc", | 783 | "safe_browsing_metrics_collector_factory.cc", |
| 791 | "safe_browsing_metrics_collector_factory.h", | 784 | "safe_browsing_metrics_collector_factory.h", |
| 792 | @@ -428,6 +431,7 @@ source_set("metrics_collector") { | 785 | @@ -463,6 +466,7 @@ source_set("metrics_collector") { |
| 793 | "//components/safe_browsing/core/common:safe_browsing_prefs", | 786 | "//components/safe_browsing/core/common:safe_browsing_prefs", |
| 794 | "//content/public/browser", | 787 | "//content/public/browser", |
| 795 | ] | 788 | ] |
| @@ -797,9 +790,9 @@ | |||
| 797 | } | 790 | } |
| 798 | 791 | ||
| 799 | source_set("test_support") { | 792 | source_set("test_support") { |
| 800 | --- chrome/browser/ssl/security_state_tab_helper.cc.orig | 793 | --- a/chrome/browser/ssl/security_state_tab_helper.cc |
| 801 | +++ chrome/browser/ssl/security_state_tab_helper.cc | 794 | +++ b/chrome/browser/ssl/security_state_tab_helper.cc |
| 802 | @@ -217,89 +217,6 @@ bool SecurityStateTabHelper::UsedPolicyI | 795 | @@ -180,89 +180,6 @@ bool SecurityStateTabHelper::UsedPolicyI |
| 803 | 796 | ||
| 804 | security_state::MaliciousContentStatus | 797 | security_state::MaliciousContentStatus |
| 805 | SecurityStateTabHelper::GetMaliciousContentStatus() const { | 798 | SecurityStateTabHelper::GetMaliciousContentStatus() const { |
| @@ -839,7 +832,7 @@ | |||
| 839 | - MALICIOUS_CONTENT_STATUS_SIGNED_IN_SYNC_PASSWORD_REUSE; | 832 | - MALICIOUS_CONTENT_STATUS_SIGNED_IN_SYNC_PASSWORD_REUSE; |
| 840 | - } | 833 | - } |
| 841 | -#endif | 834 | -#endif |
| 842 | - FALLTHROUGH; | 835 | - [[fallthrough]]; |
| 843 | - case safe_browsing::SB_THREAT_TYPE_SIGNED_IN_NON_SYNC_PASSWORD_REUSE: | 836 | - case safe_browsing::SB_THREAT_TYPE_SIGNED_IN_NON_SYNC_PASSWORD_REUSE: |
| 844 | -#if BUILDFLAG(FULL_SAFE_BROWSING) | 837 | -#if BUILDFLAG(FULL_SAFE_BROWSING) |
| 845 | - if (safe_browsing::ChromePasswordProtectionService:: | 838 | - if (safe_browsing::ChromePasswordProtectionService:: |
| @@ -849,7 +842,7 @@ | |||
| 849 | - MALICIOUS_CONTENT_STATUS_SIGNED_IN_NON_SYNC_PASSWORD_REUSE; | 842 | - MALICIOUS_CONTENT_STATUS_SIGNED_IN_NON_SYNC_PASSWORD_REUSE; |
| 850 | - } | 843 | - } |
| 851 | -#endif | 844 | -#endif |
| 852 | - FALLTHROUGH; | 845 | - [[fallthrough]]; |
| 853 | - case safe_browsing::SB_THREAT_TYPE_ENTERPRISE_PASSWORD_REUSE: | 846 | - case safe_browsing::SB_THREAT_TYPE_ENTERPRISE_PASSWORD_REUSE: |
| 854 | -#if BUILDFLAG(FULL_SAFE_BROWSING) | 847 | -#if BUILDFLAG(FULL_SAFE_BROWSING) |
| 855 | - if (safe_browsing::ChromePasswordProtectionService:: | 848 | - if (safe_browsing::ChromePasswordProtectionService:: |
| @@ -889,19 +882,19 @@ | |||
| 889 | return security_state::MALICIOUS_CONTENT_STATUS_NONE; | 882 | return security_state::MALICIOUS_CONTENT_STATUS_NONE; |
| 890 | } | 883 | } |
| 891 | 884 | ||
| 892 | --- chrome/browser/ui/BUILD.gn.orig | 885 | --- a/chrome/browser/ui/BUILD.gn |
| 893 | +++ chrome/browser/ui/BUILD.gn | 886 | +++ b/chrome/browser/ui/BUILD.gn |
| 894 | @@ -3946,7 +3946,6 @@ static_library("ui") { | 887 | @@ -4152,7 +4152,6 @@ static_library("ui") { |
| 895 | "views/device_chooser_content_view.h", | 888 | "views/download/bubble/download_dialog_view.h", |
| 896 | "views/devtools_process_observer.cc", | 889 | "views/download/bubble/download_toolbar_button_view.cc", |
| 897 | "views/devtools_process_observer.h", | 890 | "views/download/bubble/download_toolbar_button_view.h", |
| 898 | - "views/download/download_danger_prompt_views.cc", | 891 | - "views/download/download_danger_prompt_views.cc", |
| 899 | "views/download/download_in_progress_dialog_view.cc", | 892 | "views/download/download_in_progress_dialog_view.cc", |
| 900 | "views/download/download_in_progress_dialog_view.h", | 893 | "views/download/download_in_progress_dialog_view.h", |
| 901 | "views/download/download_item_view.cc", | 894 | "views/download/download_item_view.cc", |
| 902 | --- chrome/browser/ui/tab_helpers.cc.orig | 895 | --- a/chrome/browser/ui/tab_helpers.cc |
| 903 | +++ chrome/browser/ui/tab_helpers.cc | 896 | +++ b/chrome/browser/ui/tab_helpers.cc |
| 904 | @@ -330,16 +330,6 @@ void TabHelpers::AttachTabHelpers(WebCon | 897 | @@ -363,22 +363,6 @@ void TabHelpers::AttachTabHelpers(WebCon |
| 905 | // See https://crbug.com/910288. | 898 | // See https://crbug.com/910288. |
| 906 | resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents( | 899 | resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents( |
| 907 | web_contents); | 900 | web_contents); |
| @@ -910,6 +903,12 @@ | |||
| 910 | - safe_browsing::SafeBrowsingNavigationObserverManagerFactory:: | 903 | - safe_browsing::SafeBrowsingNavigationObserverManagerFactory:: |
| 911 | - GetForBrowserContext(profile), | 904 | - GetForBrowserContext(profile), |
| 912 | - profile->GetPrefs(), g_browser_process->safe_browsing_service()); | 905 | - profile->GetPrefs(), g_browser_process->safe_browsing_service()); |
| 906 | - if (base::FeatureList::IsEnabled( | ||
| 907 | - safe_browsing::kTailoredSecurityIntegration)) { | ||
| 908 | - safe_browsing::TailoredSecurityUrlObserver::CreateForWebContents( | ||
| 909 | - web_contents, | ||
| 910 | - safe_browsing::TailoredSecurityServiceFactory::GetForProfile(profile)); | ||
| 911 | - } | ||
| 913 | - safe_browsing::SafeBrowsingTabObserver::CreateForWebContents( | 912 | - safe_browsing::SafeBrowsingTabObserver::CreateForWebContents( |
| 914 | - web_contents, | 913 | - web_contents, |
| 915 | - std::make_unique<safe_browsing::ChromeSafeBrowsingTabObserverDelegate>()); | 914 | - std::make_unique<safe_browsing::ChromeSafeBrowsingTabObserverDelegate>()); |
| @@ -918,8 +917,8 @@ | |||
| 918 | ReputationWebContentsObserver::CreateForWebContents(web_contents); | 917 | ReputationWebContentsObserver::CreateForWebContents(web_contents); |
| 919 | SearchEngineTabHelper::CreateForWebContents(web_contents); | 918 | SearchEngineTabHelper::CreateForWebContents(web_contents); |
| 920 | SecurityStateTabHelper::CreateForWebContents(web_contents); | 919 | SecurityStateTabHelper::CreateForWebContents(web_contents); |
| 921 | --- chrome/browser/ui/webui/downloads/downloads_dom_handler.cc.orig | 920 | --- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc |
| 922 | +++ chrome/browser/ui/webui/downloads/downloads_dom_handler.cc | 921 | +++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc |
| 923 | @@ -23,7 +23,6 @@ | 922 | @@ -23,7 +23,6 @@ |
| 924 | #include "base/threading/thread.h" | 923 | #include "base/threading/thread.h" |
| 925 | #include "base/values.h" | 924 | #include "base/values.h" |
| @@ -928,7 +927,7 @@ | |||
| 928 | #include "chrome/browser/download/download_history.h" | 927 | #include "chrome/browser/download/download_history.h" |
| 929 | #include "chrome/browser/download/download_item_model.h" | 928 | #include "chrome/browser/download/download_item_model.h" |
| 930 | #include "chrome/browser/download/download_prefs.h" | 929 | #include "chrome/browser/download/download_prefs.h" |
| 931 | @@ -171,9 +170,6 @@ void DownloadsDOMHandler::SaveDangerousR | 930 | @@ -172,9 +171,6 @@ void DownloadsDOMHandler::SaveDangerousR |
| 932 | } | 931 | } |
| 933 | 932 | ||
| 934 | CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS); | 933 | CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS); |
| @@ -938,7 +937,7 @@ | |||
| 938 | } | 937 | } |
| 939 | 938 | ||
| 940 | void DownloadsDOMHandler::AcceptIncognitoWarning(const std::string& id) { | 939 | void DownloadsDOMHandler::AcceptIncognitoWarning(const std::string& id) { |
| 941 | @@ -325,12 +321,6 @@ void DownloadsDOMHandler::RemoveDownload | 940 | @@ -326,12 +322,6 @@ void DownloadsDOMHandler::RemoveDownload |
| 942 | IdSet ids; | 941 | IdSet ids; |
| 943 | 942 | ||
| 944 | for (auto* download : to_remove) { | 943 | for (auto* download : to_remove) { |
| @@ -951,7 +950,7 @@ | |||
| 951 | DownloadItemModel item_model(download); | 950 | DownloadItemModel item_model(download); |
| 952 | if (!item_model.ShouldShowInShelf() || | 951 | if (!item_model.ShouldShowInShelf() || |
| 953 | download->GetState() == download::DownloadItem::IN_PROGRESS) { | 952 | download->GetState() == download::DownloadItem::IN_PROGRESS) { |
| 954 | @@ -404,44 +394,6 @@ void DownloadsDOMHandler::FinalizeRemova | 953 | @@ -405,44 +395,6 @@ void DownloadsDOMHandler::FinalizeRemova |
| 955 | } | 954 | } |
| 956 | } | 955 | } |
| 957 | 956 | ||
| @@ -996,17 +995,17 @@ | |||
| 996 | bool DownloadsDOMHandler::IsDeletingHistoryAllowed() { | 995 | bool DownloadsDOMHandler::IsDeletingHistoryAllowed() { |
| 997 | content::DownloadManager* manager = GetMainNotifierManager(); | 996 | content::DownloadManager* manager = GetMainNotifierManager(); |
| 998 | return manager && | 997 | return manager && |
| 999 | --- chrome/browser/ui/webui/downloads/downloads_dom_handler.h.orig | 998 | --- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.h |
| 1000 | +++ chrome/browser/ui/webui/downloads/downloads_dom_handler.h | 999 | +++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.h |
| 1001 | @@ -12,7 +12,6 @@ | 1000 | @@ -12,7 +12,6 @@ |
| 1002 | 1001 | ||
| 1003 | #include "base/macros.h" | 1002 | #include "base/memory/raw_ptr.h" |
| 1004 | #include "base/memory/weak_ptr.h" | 1003 | #include "base/memory/weak_ptr.h" |
| 1005 | -#include "chrome/browser/download/download_danger_prompt.h" | 1004 | -#include "chrome/browser/download/download_danger_prompt.h" |
| 1006 | #include "chrome/browser/ui/webui/downloads/downloads.mojom-forward.h" | 1005 | #include "chrome/browser/ui/webui/downloads/downloads.mojom-forward.h" |
| 1007 | #include "chrome/browser/ui/webui/downloads/downloads_list_tracker.h" | 1006 | #include "chrome/browser/ui/webui/downloads/downloads_list_tracker.h" |
| 1008 | #include "content/public/browser/web_contents_observer.h" | 1007 | #include "content/public/browser/web_contents_observer.h" |
| 1009 | @@ -94,18 +93,6 @@ class DownloadsDOMHandler : public conte | 1008 | @@ -95,18 +94,6 @@ class DownloadsDOMHandler : public conte |
| 1010 | // null-checking |original_notifier_|. | 1009 | // null-checking |original_notifier_|. |
| 1011 | content::DownloadManager* GetOriginalNotifierManager() const; | 1010 | content::DownloadManager* GetOriginalNotifierManager() const; |
| 1012 | 1011 | ||
| @@ -1025,9 +1024,9 @@ | |||
| 1025 | // Returns true if the records of any downloaded items are allowed (and able) | 1024 | // Returns true if the records of any downloaded items are allowed (and able) |
| 1026 | // to be deleted. | 1025 | // to be deleted. |
| 1027 | bool IsDeletingHistoryAllowed(); | 1026 | bool IsDeletingHistoryAllowed(); |
| 1028 | --- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig | 1027 | --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc |
| 1029 | +++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc | 1028 | +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc |
| 1030 | @@ -281,116 +281,6 @@ CreateHttpsOnlyModePage(content::WebCont | 1029 | @@ -273,120 +273,6 @@ CreateHttpsOnlyModePage(content::WebCont |
| 1031 | request_url)); | 1030 | request_url)); |
| 1032 | } | 1031 | } |
| 1033 | 1032 | ||
| @@ -1037,7 +1036,8 @@ | |||
| 1037 | - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; | 1036 | - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; |
| 1038 | - GURL request_url("http://example.com"); | 1037 | - GURL request_url("http://example.com"); |
| 1039 | - std::string url_param; | 1038 | - std::string url_param; |
| 1040 | - if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { | 1039 | - if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "url", |
| 1040 | - &url_param)) { | ||
| 1041 | - if (GURL(url_param).is_valid()) { | 1041 | - if (GURL(url_param).is_valid()) { |
| 1042 | - request_url = GURL(url_param); | 1042 | - request_url = GURL(url_param); |
| 1043 | - } | 1043 | - } |
| @@ -1046,7 +1046,8 @@ | |||
| 1046 | - // TODO(mattm): add flag to change main_frame_url or add dedicated flag to | 1046 | - // TODO(mattm): add flag to change main_frame_url or add dedicated flag to |
| 1047 | - // test subresource interstitials. | 1047 | - // test subresource interstitials. |
| 1048 | - std::string type_param; | 1048 | - std::string type_param; |
| 1049 | - if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) { | 1049 | - if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "type", |
| 1050 | - &type_param)) { | ||
| 1050 | - if (type_param == "malware") { | 1051 | - if (type_param == "malware") { |
| 1051 | - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; | 1052 | - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; |
| 1052 | - } else if (type_param == "phishing") { | 1053 | - } else if (type_param == "phishing") { |
| @@ -1094,14 +1095,16 @@ | |||
| 1094 | - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; | 1095 | - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; |
| 1095 | - GURL request_url("http://example.com"); | 1096 | - GURL request_url("http://example.com"); |
| 1096 | - std::string url_param; | 1097 | - std::string url_param; |
| 1097 | - if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { | 1098 | - if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "url", |
| 1099 | - &url_param)) { | ||
| 1098 | - if (GURL(url_param).is_valid()) | 1100 | - if (GURL(url_param).is_valid()) |
| 1099 | - request_url = GURL(url_param); | 1101 | - request_url = GURL(url_param); |
| 1100 | - } | 1102 | - } |
| 1101 | - GURL main_frame_url(request_url); | 1103 | - GURL main_frame_url(request_url); |
| 1102 | - std::string type_param; | 1104 | - std::string type_param; |
| 1103 | - bool is_giant_webview = false; | 1105 | - bool is_giant_webview = false; |
| 1104 | - if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) { | 1106 | - if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "type", |
| 1107 | - &type_param)) { | ||
| 1105 | - if (type_param == "malware") { | 1108 | - if (type_param == "malware") { |
| 1106 | - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; | 1109 | - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; |
| 1107 | - } else if (type_param == "phishing") { | 1110 | - } else if (type_param == "phishing") { |
| @@ -1144,16 +1147,16 @@ | |||
| 1144 | #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) | 1147 | #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 1145 | std::unique_ptr<CaptivePortalBlockingPage> CreateCaptivePortalBlockingPage( | 1148 | std::unique_ptr<CaptivePortalBlockingPage> CreateCaptivePortalBlockingPage( |
| 1146 | content::WebContents* web_contents) { | 1149 | content::WebContents* web_contents) { |
| 1147 | @@ -507,8 +397,6 @@ void InterstitialHTMLSource::StartDataRe | 1150 | @@ -501,8 +387,6 @@ void InterstitialHTMLSource::StartDataRe |
| 1151 | interstitial_delegate = CreateMITMSoftwareBlockingPage(web_contents); | ||
| 1152 | } else if (path_without_query == "/blocked-interception") { | ||
| 1148 | interstitial_delegate = CreateBlockedInterceptionBlockingPage(web_contents); | 1153 | interstitial_delegate = CreateBlockedInterceptionBlockingPage(web_contents); |
| 1149 | } else if (path_without_query == "/legacy-tls") { | ||
| 1150 | interstitial_delegate = CreateLegacyTLSBlockingPage(web_contents); | ||
| 1151 | - } else if (path_without_query == "/safebrowsing") { | 1154 | - } else if (path_without_query == "/safebrowsing") { |
| 1152 | - interstitial_delegate = CreateSafeBrowsingBlockingPage(web_contents); | 1155 | - interstitial_delegate = CreateSafeBrowsingBlockingPage(web_contents); |
| 1153 | } else if (path_without_query == "/clock") { | 1156 | } else if (path_without_query == "/clock") { |
| 1154 | interstitial_delegate = CreateBadClockBlockingPage(web_contents); | 1157 | interstitial_delegate = CreateBadClockBlockingPage(web_contents); |
| 1155 | } else if (path_without_query == "/lookalike") { | 1158 | } else if (path_without_query == "/lookalike") { |
| 1156 | @@ -525,16 +413,12 @@ void InterstitialHTMLSource::StartDataRe | 1159 | @@ -519,16 +403,12 @@ void InterstitialHTMLSource::StartDataRe |
| 1157 | interstitial_delegate = CreateHttpsOnlyModePage(web_contents); | 1160 | interstitial_delegate = CreateHttpsOnlyModePage(web_contents); |
| 1158 | } | 1161 | } |
| 1159 | 1162 | ||
| @@ -1173,9 +1176,9 @@ | |||
| 1173 | html = interstitial_delegate.get()->GetHTMLContents(); | 1176 | html = interstitial_delegate.get()->GetHTMLContents(); |
| 1174 | } else { | 1177 | } else { |
| 1175 | html = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( | 1178 | html = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( |
| 1176 | --- chrome/renderer/chrome_content_renderer_client.cc.orig | 1179 | --- a/chrome/renderer/chrome_content_renderer_client.cc |
| 1177 | +++ chrome/renderer/chrome_content_renderer_client.cc | 1180 | +++ b/chrome/renderer/chrome_content_renderer_client.cc |
| 1178 | @@ -97,7 +97,6 @@ | 1181 | @@ -91,7 +91,6 @@ |
| 1179 | #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" | 1182 | #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" |
| 1180 | #include "components/paint_preview/buildflags/buildflags.h" | 1183 | #include "components/paint_preview/buildflags/buildflags.h" |
| 1181 | #include "components/safe_browsing/buildflags.h" | 1184 | #include "components/safe_browsing/buildflags.h" |
| @@ -1183,8 +1186,8 @@ | |||
| 1183 | #include "components/spellcheck/spellcheck_buildflags.h" | 1186 | #include "components/spellcheck/spellcheck_buildflags.h" |
| 1184 | #include "components/subresource_filter/content/renderer/subresource_filter_agent.h" | 1187 | #include "components/subresource_filter/content/renderer/subresource_filter_agent.h" |
| 1185 | #include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h" | 1188 | #include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h" |
| 1186 | --- components/security_interstitials/content/cert_report_helper.cc.orig | 1189 | --- a/components/security_interstitials/content/cert_report_helper.cc |
| 1187 | +++ components/security_interstitials/content/cert_report_helper.cc | 1190 | +++ b/components/security_interstitials/content/cert_report_helper.cc |
| 1188 | @@ -177,7 +177,6 @@ void CertReportHelper::FinishCertCollect | 1191 | @@ -177,7 +177,6 @@ void CertReportHelper::FinishCertCollect |
| 1189 | return; | 1192 | return; |
| 1190 | } | 1193 | } |
