From 6dd02c043ec74eed08f8d65e939f7a69652c8498 Mon Sep 17 00:00:00 2001 From: xsmile <> Date: Thu, 4 Oct 2018 21:55:46 +0200 Subject: [PATCH] patches/iridium: Update for 70 Removed safe_browsing-support-trk-prefix.patch: The SB protocol was updated from v3 to v4 and the relevant code was likely moved to components/safe_browsing/db/ --- ...refixes-to-possibly-evil-connections.patch | 36 +++++++++---------- ...ble-profile-auto-import-on-first-run.patch | 2 +- ..._browsing-disable-incident-reporting.patch | 2 +- .../safe_browsing-support-trk-prefix.patch | 28 --------------- .../updater-disable-auto-update.patch | 2 +- 5 files changed, 21 insertions(+), 49 deletions(-) delete mode 100644 patches/iridium-browser/safe_browsing-support-trk-prefix.patch diff --git a/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch b/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch index bbf9d709..36dd0c54 100644 --- a/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch +++ b/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch @@ -84,7 +84,7 @@ by default. for tag_suffix in _TagSuffixes(): --- a/chrome/browser/chromeos/customization/customization_document.cc +++ b/chrome/browser/chromeos/customization/customization_document.cc -@@ -167,7 +167,7 @@ std::string ReadFileInBackground(const b +@@ -173,7 +173,7 @@ std::string ReadFileInBackground(const b // Template URL where to fetch OEM services customization manifest from. const char ServicesCustomizationDocument::kManifestUrl[] = @@ -95,7 +95,7 @@ by default. // creates and uses to publish OEM default apps to the extensions system. --- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc -@@ -1523,7 +1523,7 @@ void FileManagerPrivateInternalGetDownlo +@@ -1504,7 +1504,7 @@ void FileManagerPrivateInternalGetDownlo SigninManagerFactory::GetForProfile(GetProfile()); const std::string& account_id = signin_manager->GetAuthenticatedAccountId(); std::vector scopes; @@ -106,7 +106,7 @@ by default. content::BrowserContext::GetDefaultStoragePartition(GetProfile()) --- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc -@@ -76,7 +76,7 @@ namespace { +@@ -74,7 +74,7 @@ namespace { using api::file_manager_private::ProfileInfo; @@ -117,7 +117,7 @@ by default. AppWindow* GetCurrentAppWindow(UIThreadExtensionFunction* function) { --- a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc -@@ -23,26 +23,26 @@ namespace { +@@ -24,26 +24,26 @@ namespace { // Location of the page to buy more storage for Google Drive. const char kGoogleDriveBuyStorageUrl[] = @@ -207,7 +207,7 @@ by default. ProfileAvatarDownloader::ProfileAvatarDownloader( --- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/prefs.js -@@ -78,9 +78,9 @@ cvox.ChromeVoxPrefs.DEFAULT_PREFS = { +@@ -82,9 +82,9 @@ cvox.ChromeVoxPrefs.DEFAULT_PREFS = { 'position': '{}', 'siteSpecificEnhancements': true, 'siteSpecificScriptBase': @@ -289,7 +289,7 @@ by default. base::ToLowerASCII(bdict_file)); --- a/chrome/browser/supervised_user/supervised_user_service.cc +++ b/chrome/browser/supervised_user/supervised_user_service.cc -@@ -84,7 +84,7 @@ namespace { +@@ -85,7 +85,7 @@ namespace { // The URL from which to download a host blacklist if no local one exists yet. const char kBlacklistURL[] = @@ -311,7 +311,7 @@ by default. "----**--yradnuoBgoLtrapitluMklaTelgooG--**----"; --- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc +++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc -@@ -32,7 +32,7 @@ namespace { +@@ -31,7 +31,7 @@ namespace { // The URL to be used to re-install Chrome when auto-update failed for too long. constexpr char kDownloadChromeUrl[] = @@ -346,7 +346,7 @@ by default. SkColor GetThemeColor(const ui::ThemeProvider& tp, int id) { --- a/chrome/common/extensions/chrome_extensions_client.cc +++ b/chrome/common/extensions/chrome_extensions_client.cc -@@ -60,9 +60,9 @@ namespace { +@@ -43,9 +43,9 @@ namespace { // TODO(battre): Delete the HTTP URL once the blacklist is downloaded via HTTPS. const char kExtensionBlocklistUrlPrefix[] = @@ -360,7 +360,7 @@ by default. --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc -@@ -108,7 +108,7 @@ const char kCloudPrintCertificateErrorLe +@@ -104,7 +104,7 @@ const char kCloudPrintCertificateErrorLe #endif const char kCloudPrintNoDestinationsLearnMoreURL[] = @@ -369,7 +369,7 @@ by default. const char kContentSettingsExceptionsLearnMoreURL[] = "https://support.google.com/chrome/?p=settings_manage_exceptions"; -@@ -220,7 +220,7 @@ const char kSyncErrorsHelpURL[] = +@@ -213,7 +213,7 @@ const char kSyncErrorsHelpURL[] = "https://support.google.com/chrome/?p=settings_sync_error"; const char kSyncGoogleDashboardURL[] = @@ -378,7 +378,7 @@ by default. const char kSyncLearnMoreURL[] = "https://support.google.com/chrome/?p=settings_sign_in"; -@@ -298,7 +298,7 @@ const char kNaturalScrollHelpURL[] = +@@ -294,7 +294,7 @@ const char kNaturalScrollHelpURL[] = const char kOemEulaURLPath[] = "oem"; const char kOnlineEulaURLPath[] = @@ -579,7 +579,7 @@ by default. base::Time out_time; --- a/components/policy/core/common/policy_loader_win.cc +++ b/components/policy/core/common/policy_loader_win.cc -@@ -60,7 +60,7 @@ const char kKeyThirdParty[] = "3rdparty" +@@ -57,7 +57,7 @@ const char kKeyThirdParty[] = "3rdparty" // The web store url that is the only trusted source for extensions. const char kExpectedWebStoreUrl[] = @@ -590,7 +590,7 @@ by default. --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json -@@ -2771,7 +2771,7 @@ +@@ -3040,7 +3040,7 @@ 'dynamic_refresh': True, 'per_profile': True, }, @@ -599,12 +599,12 @@ by default. 'id': 34, 'caption': '''Configure the list of force-installed apps and extensions''', 'tags': ['full-admin-access'], -@@ -6315,7 +6315,7 @@ +@@ -6637,7 +6637,7 @@ 'features': { 'dynamic_refresh': True, }, -- 'example_value': [ { "extension-id": "khgabmflimjjbclkmljlpmgaleanedem", "update-url": "https://clients2.google.com/service/update2/crx" } ], -+ 'example_value': [ { "extension-id": "khgabmflimjjbclkmljlpmgaleanedem", "update-url": "trk:18:https://clients2.google.com/service/update2/crx" } ], +- 'example_value': [ '{ "extension-id": "khgabmflimjjbclkmljlpmgaleanedem", "update-url": "https://clients2.google.com/service/update2/crx" }' ], ++ 'example_value': [ '{ "extension-id": "khgabmflimjjbclkmljlpmgaleanedem", "update-url": "trk:18:https://clients2.google.com/service/update2/crx" }' ], 'id': 135, 'caption': '''List of AppPack extensions''', 'tags': [], @@ -632,7 +632,7 @@ by default. "image_url": "{google:baseURL}searchbyimage/upload", --- a/components/translate/core/browser/translate_url_fetcher.cc +++ b/components/translate/core/browser/translate_url_fetcher.cc -@@ -108,6 +108,7 @@ bool TranslateURLFetcher::Request(const +@@ -114,6 +114,7 @@ bool TranslateURLFetcher::Request(const max_retry_on_5xx_, network::SimpleURLLoader::RetryMode::RETRY_ON_5XX); } @@ -664,7 +664,7 @@ by default. "http://clientservices.googleapis.com/chrome-variations/seed"; --- a/content/browser/speech/speech_recognition_engine.cc +++ b/content/browser/speech/speech_recognition_engine.cc -@@ -37,7 +37,7 @@ namespace content { +@@ -32,7 +32,7 @@ namespace content { namespace { const char kWebServiceBaseUrl[] = diff --git a/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch b/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch index 9a9d79c1..9fc54304 100644 --- a/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch +++ b/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch @@ -9,7 +9,7 @@ Subject: [PATCH 56/66] browser: disable profile auto-import on first run --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -1775,8 +1775,6 @@ int ChromeBrowserMainParts::PreMainMessa +@@ -1769,8 +1769,6 @@ int ChromeBrowserMainParts::PreMainMessa // and preferences have been registered since some of the import code depends // on preferences. if (first_run::IsChromeFirstRun()) { diff --git a/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch b/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch index d06ec0c3..3f4d95ac 100644 --- a/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch +++ b/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch @@ -54,7 +54,7 @@ the URL so we get notified if this happens again in the future). --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc -@@ -370,7 +370,7 @@ SafeBrowsingDatabaseManager* SafeBrowsin +@@ -325,7 +325,7 @@ SafeBrowsingUIManager* SafeBrowsingServi } void SafeBrowsingService::RegisterAllDelayedAnalysis() { diff --git a/patches/iridium-browser/safe_browsing-support-trk-prefix.patch b/patches/iridium-browser/safe_browsing-support-trk-prefix.patch deleted file mode 100644 index 787281c5..00000000 --- a/patches/iridium-browser/safe_browsing-support-trk-prefix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cf6436d8bbc1af76ccd79b3aead4fcbcda40bb27 Mon Sep 17 00:00:00 2001 -From: Joachim Bauch -Date: Mon, 6 Jul 2015 18:18:03 +0200 -Subject: [PATCH 49/66] safe_browsing: support trk: prefix - ---- - chrome/browser/safe_browsing/protocol_manager.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - ---- a/chrome/browser/safe_browsing/protocol_manager.cc -+++ b/chrome/browser/safe_browsing/protocol_manager.cc -@@ -879,11 +879,13 @@ GURL SafeBrowsingProtocolManager::GetHas - GURL SafeBrowsingProtocolManager::NextChunkUrl(const std::string& url) const { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - std::string next_url; -- if (!base::StartsWith(url, "http://", base::CompareCase::INSENSITIVE_ASCII) && -- !base::StartsWith(url, "https://", -+ const std::string notrk_url(GURL(url).strip_trk().spec()); -+ const std::string notrk_url_prefix_(GURL(url_prefix_).strip_trk().spec()); -+ if (!base::StartsWith(notrk_url, "http://", base::CompareCase::INSENSITIVE_ASCII) && -+ !base::StartsWith(notrk_url, "https://", - base::CompareCase::INSENSITIVE_ASCII)) { - // Use https if we updated via https, otherwise http (useful for testing). -- if (base::StartsWith(url_prefix_, "https://", -+ if (base::StartsWith(notrk_url_prefix_, "https://", - base::CompareCase::INSENSITIVE_ASCII)) - next_url.append("https://"); - else diff --git a/patches/iridium-browser/updater-disable-auto-update.patch b/patches/iridium-browser/updater-disable-auto-update.patch index b65a637a..dd2bddea 100644 --- a/patches/iridium-browser/updater-disable-auto-update.patch +++ b/patches/iridium-browser/updater-disable-auto-update.patch @@ -16,7 +16,7 @@ the case anyway, since we are based off Chromium, not Chrome. --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm -@@ -671,7 +671,7 @@ static base::mac::ScopedObjCClassSwizzle +@@ -672,7 +672,7 @@ static base::mac::ScopedObjCClassSwizzle CFStringRef checkInterval = CFSTR("checkInterval"); CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app); if (!plist) {