all-add-trk-prefixes-to-possibly-evil-connections.patch 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. From 06f6141610cb2aa562c94dbb9f1f4355e4b34c5d Mon Sep 17 00:00:00 2001
  2. From: Jan Engelhardt <jengelh@inai.de>
  3. Date: Mon, 30 Sep 2019 09:37:51 +0200
  4. Subject: [PATCH 75/76] all: add trk: prefixes to possibly evil connections
  5. Prefix URLs to Google services with trk: so that whenever something
  6. tries to load them, the developer will be informed via printf and
  7. dialog (extra info bar between URLbar and content window) about this.
  8. If you see such dialog, we know that (a) either the URL needs to be
  9. whitelisted, or (b) the feature that triggered it needs to be disabled
  10. by default.
  11. ---
  12. build/mac/tweak_info_plist.py | 2 +-
  13. .../customization/customization_document.cc | 2 +-
  14. .../file_manager/private_api_drive.cc | 2 +-
  15. .../file_manager/private_api_misc.cc | 2 +-
  16. .../remote_commands/crd_host_delegate.cc | 6 +++---
  17. .../cryptotoken_private_api.cc | 4 ++--
  18. chrome/browser/extensions/install_signer.cc | 2 +-
  19. .../media/webrtc/webrtc_event_log_uploader.cc | 2 +-
  20. .../media/webrtc/webrtc_log_uploader.cc | 2 +-
  21. .../nacl_host/nacl_infobar_delegate.cc | 2 +-
  22. .../profiles/profile_avatar_downloader.cc | 2 +-
  23. .../default_apps/external_extensions.json | 6 +++---
  24. .../client_side_detection_service.cc | 2 +-
  25. .../download_protection/download_feedback.cc | 2 +-
  26. .../spellcheck_hunspell_dictionary.cc | 2 +-
  27. .../supervised_user_service.cc | 2 +-
  28. .../browser/tracing/crash_service_uploader.cc | 2 +-
  29. .../ui/views/outdated_upgrade_bubble_view.cc | 2 +-
  30. .../ui/webui/ntp/ntp_resource_cache.cc | 8 ++++----
  31. .../components/recovery_component.cc | 2 +-
  32. .../crash/crashpad_crash_reporter.cc | 2 +-
  33. .../extensions/chrome_extensions_client.cc | 4 ++--
  34. .../setup/google_chrome_behaviors.cc | 2 +-
  35. .../browser/service/cast_service_simple.cc | 2 +-
  36. chromecast/crash/linux/minidump_uploader.cc | 2 +-
  37. .../simple_geolocation_provider.cc | 2 +-
  38. .../common/cloud_devices_urls.cc | 8 ++++----
  39. components/drive/service/drive_api_service.cc | 4 ++--
  40. components/feedback/feedback_uploader.cc | 2 +-
  41. components/gcm_driver/gcm_account_tracker.cc | 4 ++--
  42. components/google/core/common/google_util.cc | 2 +-
  43. .../core/browser/web_history_service.cc | 6 +++---
  44. components/metrics/url_constants.cc | 2 +-
  45. .../core/browser/password_store.cc | 8 ++++----
  46. .../safe_search_url_checker_client.cc | 2 +-
  47. .../safe_search_api/stub_url_checker.cc | 2 +-
  48. .../core/browser/translate_url_fetcher.cc | 1 +
  49. .../translate/core/common/translate_util.cc | 2 +-
  50. .../variations/variations_url_constants.cc | 2 +-
  51. .../speech/speech_recognition_engine.cc | 2 +-
  52. .../browser/webauth/authenticator_common.cc | 4 ++--
  53. .../shell/browser/shell_browser_main_parts.cc | 2 +-
  54. google_apis/gaia/gaia_constants.cc | 20 +++++++++----------
  55. google_apis/gaia/gaia_urls.cc | 1 +
  56. google_apis/gcm/engine/gservices_settings.cc | 6 +++---
  57. .../notifier/base/gaia_token_pre_xmpp_auth.cc | 2 +-
  58. remoting/base/breakpad_mac.mm | 2 +-
  59. remoting/protocol/jingle_messages.cc | 2 +-
  60. rlz/lib/lib_values.cc | 2 +-
  61. third_party/libjingle_xmpp/xmpp/constants.cc | 6 +++---
  62. .../chromevox/background/prefs.js | 4 ++--
  63. .../chromevoxclassic/host/chrome/host.js | 4 ++--
  64. ui/views/examples/webview_example.cc | 2 +-
  65. 54 files changed, 89 insertions(+), 87 deletions(-)
  66. --- a/build/apple/tweak_info_plist.py
  67. +++ b/build/apple/tweak_info_plist.py
  68. @@ -212,7 +212,7 @@ def _AddKeystoneKeys(plist, bundle_ident
  69. also requires the |bundle_identifier| argument (com.example.product)."""
  70. plist['KSVersion'] = plist['CFBundleShortVersionString']
  71. plist['KSProductID'] = bundle_identifier
  72. - plist['KSUpdateURL'] = 'https://tools.google.com/service/update2'
  73. + plist['KSUpdateURL'] = 'trk:132:https://tools.google.com/service/update2'
  74. _RemoveKeys(plist, 'KSChannelID')
  75. if base_tag != '':
  76. --- a/chrome/browser/ash/customization/customization_document.h
  77. +++ b/chrome/browser/ash/customization/customization_document.h
  78. @@ -155,7 +155,7 @@ class ServicesCustomizationDocument : pu
  79. // Template URL where to fetch OEM services customization manifest from.
  80. static constexpr char kManifestUrl[] =
  81. - "https://ssl.gstatic.com/chrome/chromeos-customization/%s.json";
  82. + "trk:151:https://ssl.gstatic.com/chrome/chromeos-customization/%s.json";
  83. // Return true if the customization was applied. Customization is applied only
  84. // once per machine.
  85. --- a/chrome/browser/extensions/install_signer.cc
  86. +++ b/chrome/browser/extensions/install_signer.cc
  87. @@ -64,7 +64,7 @@ const int kSignatureFormatVersion = 2;
  88. const size_t kSaltBytes = 32;
  89. const char kBackendUrl[] =
  90. - "https://www.googleapis.com/chromewebstore/v1.1/items/verify";
  91. + "trk:222:https://www.googleapis.com/chromewebstore/v1.1/items/verify";
  92. const char kPublicKeyPEM[] =
  93. "-----BEGIN PUBLIC KEY-----"
  94. --- a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
  95. +++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
  96. @@ -111,7 +111,7 @@ void OnURLLoadUploadProgress(uint64_t cu
  97. } // namespace
  98. const char WebRtcEventLogUploaderImpl::kUploadURL[] =
  99. - "https://clients2.google.com/cr/report";
  100. + "trk:300:https://clients2.google.com/cr/report";
  101. WebRtcEventLogUploaderImpl::Factory::Factory(
  102. scoped_refptr<base::SequencedTaskRunner> task_runner)
  103. --- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
  104. +++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
  105. @@ -528,7 +528,7 @@ void WebRtcLogUploader::UploadCompressed
  106. }
  107. })");
  108. - constexpr char kUploadURL[] = "https://clients2.google.com/cr/report";
  109. + constexpr char kUploadURL[] = "trk:301:https://clients2.google.com/cr/report";
  110. auto resource_request = std::make_unique<network::ResourceRequest>();
  111. resource_request->url = !upload_url_for_testing_.is_empty()
  112. ? upload_url_for_testing_
  113. --- a/chrome/browser/nacl_host/nacl_infobar_delegate.cc
  114. +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.cc
  115. @@ -33,7 +33,7 @@ std::u16string NaClInfoBarDelegate::GetL
  116. }
  117. GURL NaClInfoBarDelegate::GetLinkURL() const {
  118. - return GURL("https://support.google.com/chrome/?p=ib_nacl");
  119. + return GURL("trk:143:https://support.google.com/chrome/?p=ib_nacl");
  120. }
  121. std::u16string NaClInfoBarDelegate::GetMessageText() const {
  122. --- a/chrome/browser/profiles/profile_avatar_downloader.cc
  123. +++ b/chrome/browser/profiles/profile_avatar_downloader.cc
  124. @@ -20,7 +20,7 @@
  125. namespace {
  126. const char kHighResAvatarDownloadUrlPrefix[] =
  127. - "https://www.gstatic.com/chrome/profile_avatars/";
  128. + "trk:271:https://www.gstatic.com/chrome/profile_avatars/";
  129. }
  130. ProfileAvatarDownloader::ProfileAvatarDownloader(size_t icon_index,
  131. --- a/chrome/browser/resources/default_apps/external_extensions.json
  132. +++ b/chrome/browser/resources/default_apps/external_extensions.json
  133. @@ -3,7 +3,7 @@
  134. {
  135. // Drive extension
  136. "ghbmnnjooekpmoecnnnilnnbdlolhkhi" : {
  137. - "external_update_url": "https://clients2.google.com/service/update2/crx"
  138. + "external_update_url": "trk:04:https://clients2.google.com/service/update2/crx"
  139. }
  140. }
  141. --- a/chrome/browser/safe_browsing/download_protection/download_feedback.cc
  142. +++ b/chrome/browser/safe_browsing/download_protection/download_feedback.cc
  143. @@ -192,7 +192,7 @@ const int64_t DownloadFeedback::kMaxUplo
  144. // static
  145. const char DownloadFeedback::kSbFeedbackURL[] =
  146. - "https://safebrowsing.google.com/safebrowsing/uploads/chrome";
  147. + "trk:164:https://safebrowsing.google.com/safebrowsing/uploads/chrome";
  148. // static
  149. DownloadFeedbackFactory* DownloadFeedback::factory_ = nullptr;
  150. --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
  151. +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
  152. @@ -274,7 +274,7 @@ GURL SpellcheckHunspellDictionary::GetDi
  153. DCHECK(!bdict_file.empty());
  154. static const char kDownloadServerUrl[] =
  155. - "https://redirector.gvt1.com/edgedl/chrome/dict/";
  156. + "trk:173:https://redirector.gvt1.com/edgedl/chrome/dict/";
  157. return GURL(std::string(kDownloadServerUrl) +
  158. base::ToLowerASCII(bdict_file));
  159. --- a/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc
  160. +++ b/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc
  161. @@ -44,7 +44,7 @@ const char* kUpdateBrowserRedirectUrl =
  162. #else
  163. // The URL to be used to re-install Chrome when auto-update failed for
  164. // too long.
  165. - "https://www.google.com/chrome";
  166. + "trk:242:https://www.google.com/chrome";
  167. #endif
  168. bool g_upgrade_bubble_is_showing = false;
  169. --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
  170. +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
  171. @@ -71,17 +71,17 @@ namespace {
  172. // The URL for the the Learn More page shown on incognito new tab.
  173. const char kLearnMoreIncognitoUrl[] =
  174. #if BUILDFLAG(IS_CHROMEOS_ASH)
  175. - "https://support.google.com/chromebook/?p=incognito";
  176. + "trk:246:https://support.google.com/chromebook/?p=incognito";
  177. #else
  178. - "https://support.google.com/chrome/?p=incognito";
  179. + "trk:247:https://support.google.com/chrome/?p=incognito";
  180. #endif
  181. // The URL for the Learn More page shown on guest session new tab.
  182. const char kLearnMoreGuestSessionUrl[] =
  183. #if BUILDFLAG(IS_CHROMEOS_ASH)
  184. - "https://support.google.com/chromebook/?p=chromebook_guest";
  185. + "trk:248:https://support.google.com/chromebook/?p=chromebook_guest";
  186. #else
  187. - "https://support.google.com/chrome/?p=ui_guest";
  188. + "trk:261:https://support.google.com/chrome/?p=ui_guest";
  189. #endif
  190. std::string ReplaceTemplateExpressions(
  191. --- a/chrome/common/extensions/chrome_extensions_client.cc
  192. +++ b/chrome/common/extensions/chrome_extensions_client.cc
  193. @@ -45,9 +45,9 @@ namespace {
  194. // TODO(battre): Delete the HTTP URL once the blocklist is downloaded via HTTPS.
  195. const char kExtensionBlocklistUrlPrefix[] =
  196. - "http://www.gstatic.com/chrome/extensions/blocklist";
  197. + "trk:269:http://www.gstatic.com/chrome/extensions/blocklist";
  198. const char kExtensionBlocklistHttpsUrlPrefix[] =
  199. - "https://www.gstatic.com/chrome/extensions/blocklist";
  200. + "trk:270:https://www.gstatic.com/chrome/extensions/blocklist";
  201. } // namespace
  202. --- a/chrome/installer/setup/google_chrome_behaviors.cc
  203. +++ b/chrome/installer/setup/google_chrome_behaviors.cc
  204. @@ -36,7 +36,7 @@ namespace installer {
  205. namespace {
  206. constexpr std::wstring_view kUninstallSurveyUrl(
  207. - L"https://support.google.com/chrome?p=chrome_uninstall_survey");
  208. + L"trk:253:https://support.google.com/chrome?p=chrome_uninstall_survey");
  209. // Launches the url directly with the user's default handler for |url|.
  210. bool NavigateToUrlWithHttps(const std::wstring& url) {
  211. --- a/chromecast/crash/linux/minidump_uploader.cc
  212. +++ b/chromecast/crash/linux/minidump_uploader.cc
  213. @@ -40,7 +40,7 @@ namespace {
  214. const char kProductName[] = "Eureka";
  215. -const char kCrashServerProduction[] = "https://clients2.google.com/cr/report";
  216. +const char kCrashServerProduction[] = "trk:305:https://clients2.google.com/cr/report";
  217. const char kVirtualChannel[] = "virtual-channel";
  218. --- a/chromeos/ash/components/geolocation/simple_geolocation_provider.h
  219. +++ b/chromeos/ash/components/geolocation/simple_geolocation_provider.h
  220. @@ -91,7 +91,7 @@ class COMPONENT_EXPORT(CHROMEOS_ASH_COMP
  221. private:
  222. static constexpr char kGeolocationProviderUrl[] =
  223. - "https://www.googleapis.com/geolocation/v1/geolocate?";
  224. + "trk:215:https://www.googleapis.com/geolocation/v1/geolocate?";
  225. // This class is a singleton.
  226. explicit SimpleGeolocationProvider(
  227. --- a/components/drive/service/drive_api_service.cc
  228. +++ b/components/drive/service/drive_api_service.cc
  229. @@ -77,9 +77,9 @@ namespace drive {
  230. namespace {
  231. // OAuth2 scopes for Drive API.
  232. -const char kDriveScope[] = "https://www.googleapis.com/auth/drive";
  233. +const char kDriveScope[] = "trk:217:https://www.googleapis.com/auth/drive";
  234. const char kDriveAppsReadonlyScope[] =
  235. - "https://www.googleapis.com/auth/drive.apps.readonly";
  236. + "trk:218:https://www.googleapis.com/auth/drive.apps.readonly";
  237. const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps";
  238. // Mime type to create a directory.
  239. --- a/components/feedback/feedback_uploader.cc
  240. +++ b/components/feedback/feedback_uploader.cc
  241. @@ -39,7 +39,7 @@ constexpr base::FilePath::CharType kFeed
  242. FILE_PATH_LITERAL("Feedback Reports");
  243. constexpr char kFeedbackPostUrl[] =
  244. - "https://www.google.com/tools/feedback/chrome/__submit";
  245. + "trk:232:https://www.google.com/tools/feedback/chrome/__submit";
  246. constexpr char kProtoBufMimeType[] = "application/x-protobuf";
  247. --- a/components/google/core/common/google_util.cc
  248. +++ b/components/google/core/common/google_util.cc
  249. @@ -140,7 +140,7 @@ bool IsGoogleSearchSubdomainUrl(const GU
  250. // Global functions -----------------------------------------------------------
  251. -const char kGoogleHomepageURL[] = "https://www.google.com/";
  252. +const char kGoogleHomepageURL[] = "trk:113:https://www.google.com/";
  253. bool HasGoogleSearchQueryParam(std::string_view str) {
  254. url::Component query(0, static_cast<int>(str.length())), key, value;
  255. --- a/components/history/core/browser/web_history_service.cc
  256. +++ b/components/history/core/browser/web_history_service.cc
  257. @@ -42,13 +42,13 @@ namespace history {
  258. namespace {
  259. -const char kHistoryOAuthScope[] = "https://www.googleapis.com/auth/chromesync";
  260. +const char kHistoryOAuthScope[] = "trk:138:https://www.googleapis.com/auth/chromesync";
  261. const char kHistoryQueryHistoryUrl[] =
  262. - "https://history.google.com/history/api/lookup?client=chrome";
  263. + "trk:139:https://history.google.com/history/api/lookup?client=chrome";
  264. const char kHistoryDeleteHistoryUrl[] =
  265. - "https://history.google.com/history/api/delete?client=chrome";
  266. + "trk:140:https://history.google.com/history/api/delete?client=chrome";
  267. const char kHistoryAudioHistoryUrl[] =
  268. "https://history.google.com/history/api/lookup?client=audio";
  269. --- a/components/safe_browsing/content/browser/client_side_detection_service.cc
  270. +++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
  271. @@ -69,7 +69,7 @@ const int ClientSideDetectionService::kN
  272. const int ClientSideDetectionService::kPositiveCacheIntervalMinutes = 30;
  273. const char ClientSideDetectionService::kClientReportPhishingUrl[] =
  274. - "https://sb-ssl.google.com/safebrowsing/clientreport/phishing";
  275. + "trk:148:https://sb-ssl.google.com/safebrowsing/clientreport/phishing";
  276. struct ClientSideDetectionService::ClientPhishingReportInfo {
  277. std::unique_ptr<network::SimpleURLLoader> loader;
  278. --- a/components/safe_search_api/safe_search/safe_search_url_checker_client.cc
  279. +++ b/components/safe_search_api/safe_search/safe_search_url_checker_client.cc
  280. @@ -28,7 +28,7 @@ namespace safe_search_api {
  281. namespace {
  282. const char kSafeSearchApiUrl[] =
  283. - "https://safesearch.googleapis.com/v1:classify";
  284. + "trk:238:https://safesearch.googleapis.com/v1:classify";
  285. const char kDataContentType[] = "application/x-www-form-urlencoded";
  286. const char kDataFormat[] = "key=%s&urls=%s";
  287. --- a/components/safe_search_api/stub_url_checker.cc
  288. +++ b/components/safe_search_api/stub_url_checker.cc
  289. @@ -21,7 +21,7 @@ namespace safe_search_api {
  290. namespace {
  291. constexpr char kSafeSearchApiUrl[] =
  292. - "https://safesearch.googleapis.com/v1:classify";
  293. + "trk:238:https://safesearch.googleapis.com/v1:classify";
  294. std::string BuildResponse(bool is_porn) {
  295. base::Value::Dict dict;
  296. --- a/components/translate/core/browser/translate_url_fetcher.cc
  297. +++ b/components/translate/core/browser/translate_url_fetcher.cc
  298. @@ -99,6 +99,7 @@ bool TranslateURLFetcher::Request(const
  299. if (!extra_request_header_.empty())
  300. resource_request->headers.AddHeaderFromString(extra_request_header_);
  301. + fprintf(stderr, "translator: fetching something from %s\n", url_.spec().c_str());
  302. simple_loader_ =
  303. variations::CreateSimpleURLLoaderWithVariationsHeaderUnknownSignedIn(
  304. std::move(resource_request),
  305. --- a/components/translate/core/common/translate_util.cc
  306. +++ b/components/translate/core/common/translate_util.cc
  307. @@ -13,7 +13,7 @@
  308. namespace translate {
  309. -const char kSecurityOrigin[] = "https://translate.googleapis.com/";
  310. +const char kSecurityOrigin[] = "trk:220:https://translate.googleapis.com/";
  311. // The feature is explicitly disabled on Webview and Weblayer.
  312. // TODO(crbug.com/40819484): Enable the feature on Webview.
  313. --- a/components/variations/variations_url_constants.cc
  314. +++ b/components/variations/variations_url_constants.cc
  315. @@ -8,7 +8,7 @@ namespace variations {
  316. // Default server of Variations seed info.
  317. const char kDefaultServerUrl[] =
  318. - "https://clientservices.googleapis.com/chrome-variations/seed";
  319. + "trk:142:https://clientservices.googleapis.com/chrome-variations/seed";
  320. const char kDefaultInsecureServerUrl[] =
  321. "http://clientservices.googleapis.com/chrome-variations/seed";
  322. --- a/content/browser/speech/network_speech_recognition_engine_impl.cc
  323. +++ b/content/browser/speech/network_speech_recognition_engine_impl.cc
  324. @@ -35,7 +35,7 @@ namespace content {
  325. namespace {
  326. const char kWebServiceBaseUrl[] =
  327. - "https://www.google.com/speech-api/full-duplex/v1";
  328. + "trk:184:https://www.google.com/speech-api/full-duplex/v1";
  329. const char kDownstreamUrl[] = "/down?";
  330. const char kUpstreamUrl[] = "/up?";
  331. --- a/content/browser/webauth/webauth_request_security_checker.h
  332. +++ b/content/browser/webauth/webauth_request_security_checker.h
  333. @@ -86,9 +86,9 @@ class CONTENT_EXPORT WebAuthRequestSecur
  334. // Legacy App IDs, which google.com origins are allowed to assert for
  335. // compatibility reasons.
  336. static constexpr char kGstaticAppId[] =
  337. - "https://www.gstatic.com/securitykey/origins.json";
  338. + "trk:276:https://www.gstatic.com/securitykey/origins.json";
  339. static constexpr char kGstaticCorpAppId[] =
  340. - "https://www.gstatic.com/securitykey/a/google.com/origins.json";
  341. + "trk:277:https://www.gstatic.com/securitykey/a/google.com/origins.json";
  342. explicit WebAuthRequestSecurityChecker(RenderFrameHost* host);
  343. WebAuthRequestSecurityChecker(const WebAuthRequestSecurityChecker&) = delete;
  344. --- a/content/shell/browser/shell_browser_main_parts.cc
  345. +++ b/content/shell/browser/shell_browser_main_parts.cc
  346. @@ -91,7 +91,7 @@ GURL GetStartupURL() {
  347. #else
  348. const base::CommandLine::StringVector& args = command_line->GetArgs();
  349. if (args.empty())
  350. - return GURL("https://www.google.com/");
  351. + return GURL("trk:183:https://www.google.com/");
  352. #if BUILDFLAG(IS_WIN)
  353. GURL url(base::WideToUTF16(args[0]));
  354. --- a/extensions/common/extension_urls.cc
  355. +++ b/extensions/common/extension_urls.cc
  356. @@ -32,10 +32,10 @@ bool IsSourceFromAnExtension(const std::
  357. namespace extension_urls {
  358. -const char kChromeWebstoreBaseURL[] = "https://chrome.google.com/webstore";
  359. -const char kNewChromeWebstoreBaseURL[] = "https://chromewebstore.google.com/";
  360. +const char kChromeWebstoreBaseURL[] = "trk:09:https://chrome.google.com/webstore";
  361. +const char kNewChromeWebstoreBaseURL[] = "trk:08:https://chromewebstore.google.com/";
  362. const char kChromeWebstoreUpdateURL[] =
  363. - "https://clients2.google.com/service/update2/crx";
  364. + "trk:05:https://clients2.google.com/service/update2/crx";
  365. const char kAppMenuUtmSource[] = "ext_app_menu";
  366. const char kExtensionsMenuUtmSource[] = "ext_extensions_menu";
  367. --- a/google_apis/gaia/gaia_constants.cc
  368. +++ b/google_apis/gaia/gaia_constants.cc
  369. @@ -14,157 +14,157 @@ const char kChromeSource[] = "ChromiumBr
  370. const char kUnexpectedServiceResponse[] = "UnexpectedServiceResponse";
  371. // OAuth scopes.
  372. -const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin";
  373. +const char kOAuth1LoginScope[] = "trk:069:https://www.google.com/accounts/OAuthLogin";
  374. // Service/scope names for device management (cloud-based policy) server.
  375. const char kDeviceManagementServiceOAuth[] =
  376. - "https://www.googleapis.com/auth/chromeosdevicemanagement";
  377. + "trk:070:https://www.googleapis.com/auth/chromeosdevicemanagement";
  378. // OAuth2 scope for access to all Google APIs.
  379. -const char kAnyApiOAuth2Scope[] = "https://www.googleapis.com/auth/any-api";
  380. +const char kAnyApiOAuth2Scope[] = "trk:071:https://www.googleapis.com/auth/any-api";
  381. // OAuth2 scope for access to Chrome sync APIs
  382. const char kChromeSyncOAuth2Scope[] =
  383. - "https://www.googleapis.com/auth/chromesync";
  384. + "trk:072:https://www.googleapis.com/auth/chromesync";
  385. // OAuth2 scope for access to the Chrome Sync APIs for managed profiles.
  386. const char kChromeSyncSupervisedOAuth2Scope[] =
  387. - "https://www.googleapis.com/auth/chromesync_playpen";
  388. + "trk:073:https://www.googleapis.com/auth/chromesync_playpen";
  389. // OAuth2 scope for parental consent logging for secondary account addition.
  390. const char kKidManagementPrivilegedOAuth2Scope[] =
  391. - "https://www.googleapis.com/auth/kid.management.privileged";
  392. + "trk:075:https://www.googleapis.com/auth/kid.management.privileged";
  393. // OAuth2 scope for access to Google Family Link Supervision Setup.
  394. const char kKidsSupervisionSetupChildOAuth2Scope[] =
  395. - "https://www.googleapis.com/auth/kids.supervision.setup.child";
  396. + "trk:076:https://www.googleapis.com/auth/kids.supervision.setup.child";
  397. // OAuth2 scope for access to Google Talk APIs (XMPP).
  398. const char kGoogleTalkOAuth2Scope[] =
  399. - "https://www.googleapis.com/auth/googletalk";
  400. + "trk:077:https://www.googleapis.com/auth/googletalk";
  401. // OAuth2 scope for access to Google account information.
  402. const char kGoogleUserInfoEmail[] =
  403. - "https://www.googleapis.com/auth/userinfo.email";
  404. + "trk:078:https://www.googleapis.com/auth/userinfo.email";
  405. const char kGoogleUserInfoProfile[] =
  406. - "https://www.googleapis.com/auth/userinfo.profile";
  407. + "trk:079:https://www.googleapis.com/auth/userinfo.profile";
  408. // OAuth2 scope for IP protection proxy authentication
  409. const char kIpProtectionAuthScope[] =
  410. - "https://www.googleapis.com/auth/ip-protection";
  411. + "trk:109:https://www.googleapis.com/auth/ip-protection";
  412. // OAuth2 scope for access to the parent approval widget.
  413. const char kParentApprovalOAuth2Scope[] =
  414. - "https://www.googleapis.com/auth/kids.parentapproval";
  415. + "trk:080:https://www.googleapis.com/auth/kids.parentapproval";
  416. // OAuth2 scope for access to the people API (read-only).
  417. const char kPeopleApiReadOnlyOAuth2Scope[] =
  418. - "https://www.googleapis.com/auth/peopleapi.readonly";
  419. + "trk:081:https://www.googleapis.com/auth/peopleapi.readonly";
  420. // OAuth2 scope for access to the programmatic challenge API (read-only).
  421. const char kProgrammaticChallengeOAuth2Scope[] =
  422. - "https://www.googleapis.com/auth/accounts.programmaticchallenge";
  423. + "trk:082:https://www.googleapis.com/auth/accounts.programmaticchallenge";
  424. // OAuth2 scope for access to the Reauth flow.
  425. const char kAccountsReauthOAuth2Scope[] =
  426. - "https://www.googleapis.com/auth/accounts.reauth";
  427. + "trk:083:https://www.googleapis.com/auth/accounts.reauth";
  428. // OAuth2 scope for access to audit recording (ARI).
  429. const char kAuditRecordingOAuth2Scope[] =
  430. - "https://www.googleapis.com/auth/auditrecording-pa";
  431. + "trk:084:https://www.googleapis.com/auth/auditrecording-pa";
  432. // OAuth2 scope for access to clear cut logs.
  433. -const char kClearCutOAuth2Scope[] = "https://www.googleapis.com/auth/cclog";
  434. +const char kClearCutOAuth2Scope[] = "trk:085:https://www.googleapis.com/auth/cclog";
  435. // OAuth2 scope for FCM, the Firebase Cloud Messaging service.
  436. const char kFCMOAuthScope[] =
  437. - "https://www.googleapis.com/auth/firebase.messaging";
  438. + "trk:086:https://www.googleapis.com/auth/firebase.messaging";
  439. // OAuth2 scope for access to Tachyon api.
  440. -const char kTachyonOAuthScope[] = "https://www.googleapis.com/auth/tachyon";
  441. +const char kTachyonOAuthScope[] = "trk:087:https://www.googleapis.com/auth/tachyon";
  442. // OAuth2 scope for access to the Photos API.
  443. -const char kPhotosOAuth2Scope[] = "https://www.googleapis.com/auth/photos";
  444. +const char kPhotosOAuth2Scope[] = "trk:088:https://www.googleapis.com/auth/photos";
  445. // OAuth2 scope for access to the SecureConnect API.
  446. extern const char kSecureConnectOAuth2Scope[] =
  447. - "https://www.googleapis.com/auth/bce.secureconnect";
  448. + "trk:074:https://www.googleapis.com/auth/bce.secureconnect";
  449. // OAuth2 scope for access to Cast backdrop API.
  450. const char kCastBackdropOAuth2Scope[] =
  451. - "https://www.googleapis.com/auth/cast.backdrop";
  452. + "trk:089:https://www.googleapis.com/auth/cast.backdrop";
  453. // OAuth2 scope for access to passwords leak checking API.
  454. const char kPasswordsLeakCheckOAuth2Scope[] =
  455. - "https://www.googleapis.com/auth/identity.passwords.leak.check";
  456. + "trk:091:https://www.googleapis.com/auth/identity.passwords.leak.check";
  457. // OAuth2 scope for access to Chrome safe browsing API.
  458. const char kChromeSafeBrowsingOAuth2Scope[] =
  459. - "https://www.googleapis.com/auth/chrome-safe-browsing";
  460. + "trk:092:https://www.googleapis.com/auth/chrome-safe-browsing";
  461. // OAuth2 scope for access to kid permissions by URL.
  462. const char kClassifyUrlKidPermissionOAuth2Scope[] =
  463. - "https://www.googleapis.com/auth/kid.permission";
  464. + "trk:093:https://www.googleapis.com/auth/kid.permission";
  465. const char kKidFamilyReadonlyOAuth2Scope[] =
  466. - "https://www.googleapis.com/auth/kid.family.readonly";
  467. + "trk:094:https://www.googleapis.com/auth/kid.family.readonly";
  468. // OAuth2 scope for access to payments.
  469. const char kPaymentsOAuth2Scope[] =
  470. - "https://www.googleapis.com/auth/wallet.chrome";
  471. + "trk:095:https://www.googleapis.com/auth/wallet.chrome";
  472. const char kCryptAuthOAuth2Scope[] =
  473. - "https://www.googleapis.com/auth/cryptauth";
  474. + "trk:096:https://www.googleapis.com/auth/cryptauth";
  475. // OAuth2 scope for access to Drive.
  476. -const char kDriveOAuth2Scope[] = "https://www.googleapis.com/auth/drive";
  477. +const char kDriveOAuth2Scope[] = "trk:097:https://www.googleapis.com/auth/drive";
  478. // OAuth2 scope for access for DriveFS to access flags.
  479. const char kExperimentsAndConfigsOAuth2Scope[] =
  480. - "https://www.googleapis.com/auth/experimentsandconfigs";
  481. + "trk:209:https://www.googleapis.com/auth/experimentsandconfigs";
  482. // The scope required for an access token in order to query ItemSuggest.
  483. const char kDriveReadOnlyOAuth2Scope[] =
  484. - "https://www.googleapis.com/auth/drive.readonly";
  485. + "trk:098:https://www.googleapis.com/auth/drive.readonly";
  486. // OAuth2 scope for access to Assistant SDK.
  487. const char kAssistantOAuth2Scope[] =
  488. - "https://www.googleapis.com/auth/assistant-sdk-prototype";
  489. + "trk:099:https://www.googleapis.com/auth/assistant-sdk-prototype";
  490. // OAuth2 scope for access to nearby devices (fast pair) APIs.
  491. const char kCloudPlatformProjectsOAuth2Scope[] =
  492. - "https://www.googleapis.com/auth/cloudplatformprojects";
  493. + "trk:100:https://www.googleapis.com/auth/cloudplatformprojects";
  494. // OAuth2 scope for access to nearby sharing.
  495. const char kNearbyShareOAuth2Scope[] =
  496. - "https://www.googleapis.com/auth/nearbysharing-pa";
  497. + "trk:101:https://www.googleapis.com/auth/nearbysharing-pa";
  498. // OAuth2 scope for access to nearby sharing.
  499. const char kNearbyPresenceOAuth2Scope[] =
  500. - "https://www.googleapis.com/auth/nearbypresence-pa";
  501. + "trk:114:https://www.googleapis.com/auth/nearbypresence-pa";
  502. // OAuth2 scopes for access to GCM account tracker.
  503. -const char kGCMGroupServerOAuth2Scope[] = "https://www.googleapis.com/auth/gcm";
  504. +const char kGCMGroupServerOAuth2Scope[] = "trk:102:https://www.googleapis.com/auth/gcm";
  505. const char kGCMCheckinServerOAuth2Scope[] =
  506. - "https://www.googleapis.com/auth/android_checkin";
  507. + "trk:103:https://www.googleapis.com/auth/android_checkin";
  508. // OAuth2 scope for access to readonly Chrome web store.
  509. const char kChromeWebstoreOAuth2Scope[] =
  510. - "https://www.googleapis.com/auth/chromewebstore.readonly";
  511. + "trk:104:https://www.googleapis.com/auth/chromewebstore.readonly";
  512. // OAuth2 scope for access to Account Capabilities API.
  513. const char kAccountCapabilitiesOAuth2Scope[] =
  514. - "https://www.googleapis.com/auth/account.capabilities";
  515. + "trk:105:https://www.googleapis.com/auth/account.capabilities";
  516. // OAuth2 scope for support content API.
  517. const char kSupportContentOAuth2Scope[] =
  518. - "https://www.googleapis.com/auth/supportcontent";
  519. + "trk:106:https://www.googleapis.com/auth/supportcontent";
  520. // OAuth 2 scope for NTP Photos module API.
  521. const char kPhotosModuleOAuth2Scope[] =
  522. - "https://www.googleapis.com/auth/photos.firstparty.readonly";
  523. + "trk:107:https://www.googleapis.com/auth/photos.firstparty.readonly";
  524. // OAuth 2 scope for NTP Photos module image API.
  525. const char kPhotosModuleImageOAuth2Scope[] =
  526. - "https://www.googleapis.com/auth/photos.image.readonly";
  527. + "trk:108:https://www.googleapis.com/auth/photos.image.readonly";
  528. // OAuth 2 scope for the Discover feed.
  529. const char kFeedOAuth2Scope[] = "https://www.googleapis.com/auth/googlenow";
  530. --- a/google_apis/gaia/gaia_urls.cc
  531. +++ b/google_apis/gaia/gaia_urls.cc
  532. @@ -24,6 +24,7 @@
  533. namespace {
  534. // Gaia service constants
  535. +//adding trk: here currently crashes the program
  536. const char kDefaultGoogleUrl[] = "http://google.com";
  537. const char kDefaultGaiaUrl[] = "https://accounts.google.com";
  538. const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com";
  539. --- a/google_apis/gcm/engine/gservices_settings.cc
  540. +++ b/google_apis/gcm/engine/gservices_settings.cc
  541. @@ -29,18 +29,18 @@ const char kRegistrationURLKey[] = "gcm_
  542. const int64_t kDefaultCheckinInterval = 2 * 24 * 60 * 60; // seconds = 2 days.
  543. const int64_t kMinimumCheckinInterval = 12 * 60 * 60; // seconds = 12 hours.
  544. -const char kDefaultCheckinURL[] = "https://android.clients.google.com/checkin";
  545. +const char kDefaultCheckinURL[] = "trk:110:https://android.clients.google.com/checkin";
  546. const char kDefaultMCSHostname[] = "mtalk.google.com";
  547. const int kDefaultMCSMainSecurePort = 5228;
  548. const int kDefaultMCSFallbackSecurePort = 443;
  549. const char kDefaultRegistrationURL[] =
  550. - "https://android.clients.google.com/c2dm/register3";
  551. + "trk:111:https://android.clients.google.com/c2dm/register3";
  552. // Settings that are to be deleted are marked with this prefix in checkin
  553. // response.
  554. const char kDeleteSettingPrefix[] = "delete_";
  555. // Settings digest starts with verison number followed by '-'.
  556. const char kDigestVersionPrefix[] = "1-";
  557. -const char kMCSEnpointTemplate[] = "https://%s:%d";
  558. +const char kMCSEnpointTemplate[] = "trk:112:https://%s:%d";
  559. const int kMaxSecurePort = 65535;
  560. std::string MakeMCSEndpoint(const std::string& mcs_hostname, int port) {
  561. --- a/remoting/protocol/jingle_messages.cc
  562. +++ b/remoting/protocol/jingle_messages.cc
  563. @@ -28,7 +28,7 @@ const char kJabberNamespace[] = "jabber:
  564. const char kJingleNamespace[] = "urn:xmpp:jingle:1";
  565. // Namespace for transport messages when using standard ICE.
  566. -const char kIceTransportNamespace[] = "google:remoting:ice";
  567. +const char kIceTransportNamespace[] = "trk:100:google:remoting:ice";
  568. const char kWebrtcTransportNamespace[] = "google:remoting:webrtc";
  569. --- a/rlz/lib/lib_values.cc
  570. +++ b/rlz/lib/lib_values.cc
  571. @@ -40,7 +40,7 @@ const char kSetDccResponseVariable[] = "
  572. //
  573. const char kFinancialPingPath[] = "/tools/pso/ping";
  574. -const char kFinancialServer[] = "clients1.google.com";
  575. +const char kFinancialServer[] = "trk:443:clients1.google.com"; /* not using URLRequest! catch with cache.ir */
  576. const int kFinancialPort = 443;
  577. // Ping times in 100-nanosecond intervals.
  578. --- a/ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js
  579. +++ b/ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js
  580. @@ -72,9 +72,9 @@ cvox.ChromeVoxPrefs.DEFAULT_PREFS = {
  581. 'outputContextFirst': false,
  582. 'position': '{}',
  583. 'siteSpecificScriptBase':
  584. - 'https://ssl.gstatic.com/accessibility/javascript/ext/',
  585. + 'trk:242:https://ssl.gstatic.com/accessibility/javascript/ext/',
  586. 'siteSpecificScriptLoader':
  587. - 'https://ssl.gstatic.com/accessibility/javascript/ext/loader.js',
  588. + 'trk:243:https://ssl.gstatic.com/accessibility/javascript/ext/loader.js',
  589. 'sticky': false,
  590. 'typingEcho': 0,
  591. 'useIBeamCursor': cvox.ChromeVox.isMac,
  592. --- a/ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js
  593. +++ b/ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js
  594. @@ -96,9 +96,9 @@ cvox.ChromeHost.prototype.init = functio
  595. (!cvox.ApiImplementation.siteSpecificScriptLoader ||
  596. !cvox.ApiImplementation.siteSpecificScriptBase);
  597. cvox.ApiImplementation.siteSpecificScriptLoader =
  598. - 'https://ssl.gstatic.com/accessibility/javascript/ext/loader.js';
  599. + 'trk:244:https://ssl.gstatic.com/accessibility/javascript/ext/loader.js';
  600. cvox.ApiImplementation.siteSpecificScriptBase =
  601. - 'https://ssl.gstatic.com/accessibility/javascript/ext/';
  602. + 'trk:245:https://ssl.gstatic.com/accessibility/javascript/ext/';
  603. if (apiPrefsChanged) {
  604. var searchInit = prefs['siteSpecificEnhancements'] === 'true' ?
  605. cvox.SearchLoader.init :
  606. --- a/ui/views/examples/webview_example.cc
  607. +++ b/ui/views/examples/webview_example.cc
  608. @@ -28,7 +28,7 @@ void WebViewExample::CreateExampleView(V
  609. webview_->GetWebContents()->SetDelegate(this);
  610. container->SetLayoutManager(std::make_unique<FillLayout>());
  611. - webview_->LoadInitialURL(GURL("http://www.google.com/"));
  612. + webview_->LoadInitialURL(GURL("trk:174:http://www.google.com/"));
  613. webview_->GetWebContents()->Focus();
  614. }