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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  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. @@ -533,7 +533,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. @@ -101,7 +101,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. @@ -79,9 +79,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. @@ -145,7 +145,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. @@ -68,7 +68,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. @@ -27,7 +27,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. @@ -87,9 +87,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. @@ -38,10 +38,10 @@ const GURL* g_item_snippet_url_for_test_
  357. } // namespace
  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,166 +14,166 @@ 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 people API (read-write).
  421. const char kPeopleApiReadWriteOAuth2Scope[] =
  422. - "https://www.googleapis.com/auth/peopleapi.readwrite";
  423. + "trk:115:https://www.googleapis.com/auth/peopleapi.readwrite";
  424. // OAuth2 scope for access to the people API person's locale preferences
  425. // (read-only).
  426. const char kProfileLanguageReadOnlyOAuth2Scope[] =
  427. - "https://www.googleapis.com/auth/profile.language.read";
  428. + "trk:116:https://www.googleapis.com/auth/profile.language.read";
  429. // OAuth2 scope for access to the programmatic challenge API (read-only).
  430. const char kProgrammaticChallengeOAuth2Scope[] =
  431. - "https://www.googleapis.com/auth/accounts.programmaticchallenge";
  432. + "trk:082:https://www.googleapis.com/auth/accounts.programmaticchallenge";
  433. // OAuth2 scope for access to the Reauth flow.
  434. const char kAccountsReauthOAuth2Scope[] =
  435. - "https://www.googleapis.com/auth/accounts.reauth";
  436. + "trk:083:https://www.googleapis.com/auth/accounts.reauth";
  437. // OAuth2 scope for access to audit recording (ARI).
  438. const char kAuditRecordingOAuth2Scope[] =
  439. - "https://www.googleapis.com/auth/auditrecording-pa";
  440. + "trk:084:https://www.googleapis.com/auth/auditrecording-pa";
  441. // OAuth2 scope for access to clear cut logs.
  442. -const char kClearCutOAuth2Scope[] = "https://www.googleapis.com/auth/cclog";
  443. +const char kClearCutOAuth2Scope[] = "trk:085:https://www.googleapis.com/auth/cclog";
  444. // OAuth2 scope for FCM, the Firebase Cloud Messaging service.
  445. const char kFCMOAuthScope[] =
  446. - "https://www.googleapis.com/auth/firebase.messaging";
  447. + "trk:086:https://www.googleapis.com/auth/firebase.messaging";
  448. // OAuth2 scope for access to Tachyon api.
  449. -const char kTachyonOAuthScope[] = "https://www.googleapis.com/auth/tachyon";
  450. +const char kTachyonOAuthScope[] = "trk:087:https://www.googleapis.com/auth/tachyon";
  451. // OAuth2 scope for access to the Photos API.
  452. -const char kPhotosOAuth2Scope[] = "https://www.googleapis.com/auth/photos";
  453. +const char kPhotosOAuth2Scope[] = "trk:088:https://www.googleapis.com/auth/photos";
  454. // OAuth2 scope for access to the SecureConnect API.
  455. extern const char kSecureConnectOAuth2Scope[] =
  456. - "https://www.googleapis.com/auth/bce.secureconnect";
  457. + "trk:074:https://www.googleapis.com/auth/bce.secureconnect";
  458. // OAuth2 scope for access to Cast backdrop API.
  459. const char kCastBackdropOAuth2Scope[] =
  460. - "https://www.googleapis.com/auth/cast.backdrop";
  461. + "trk:089:https://www.googleapis.com/auth/cast.backdrop";
  462. // OAuth2 scope for access to passwords leak checking API.
  463. const char kPasswordsLeakCheckOAuth2Scope[] =
  464. - "https://www.googleapis.com/auth/identity.passwords.leak.check";
  465. + "trk:091:https://www.googleapis.com/auth/identity.passwords.leak.check";
  466. // OAuth2 scope for access to Chrome safe browsing API.
  467. const char kChromeSafeBrowsingOAuth2Scope[] =
  468. - "https://www.googleapis.com/auth/chrome-safe-browsing";
  469. + "trk:092:https://www.googleapis.com/auth/chrome-safe-browsing";
  470. // OAuth2 scope for access to kid permissions by URL.
  471. const char kClassifyUrlKidPermissionOAuth2Scope[] =
  472. - "https://www.googleapis.com/auth/kid.permission";
  473. + "trk:093:https://www.googleapis.com/auth/kid.permission";
  474. const char kKidFamilyReadonlyOAuth2Scope[] =
  475. - "https://www.googleapis.com/auth/kid.family.readonly";
  476. + "trk:094:https://www.googleapis.com/auth/kid.family.readonly";
  477. // OAuth2 scope for access to payments.
  478. const char kPaymentsOAuth2Scope[] =
  479. - "https://www.googleapis.com/auth/wallet.chrome";
  480. + "trk:095:https://www.googleapis.com/auth/wallet.chrome";
  481. const char kCryptAuthOAuth2Scope[] =
  482. - "https://www.googleapis.com/auth/cryptauth";
  483. + "trk:096:https://www.googleapis.com/auth/cryptauth";
  484. // OAuth2 scope for access to Drive.
  485. -const char kDriveOAuth2Scope[] = "https://www.googleapis.com/auth/drive";
  486. +const char kDriveOAuth2Scope[] = "trk:097:https://www.googleapis.com/auth/drive";
  487. // OAuth2 scope for access for DriveFS to access flags.
  488. const char kExperimentsAndConfigsOAuth2Scope[] =
  489. - "https://www.googleapis.com/auth/experimentsandconfigs";
  490. + "trk:209:https://www.googleapis.com/auth/experimentsandconfigs";
  491. // The scope required for an access token in order to query ItemSuggest.
  492. const char kDriveReadOnlyOAuth2Scope[] =
  493. - "https://www.googleapis.com/auth/drive.readonly";
  494. + "trk:098:https://www.googleapis.com/auth/drive.readonly";
  495. // OAuth2 scope for access to Assistant SDK.
  496. const char kAssistantOAuth2Scope[] =
  497. - "https://www.googleapis.com/auth/assistant-sdk-prototype";
  498. + "trk:099:https://www.googleapis.com/auth/assistant-sdk-prototype";
  499. // OAuth2 scope for access to nearby devices (fast pair) APIs.
  500. const char kNearbyDevicesOAuth2Scope[] =
  501. - "https://www.googleapis.com/auth/nearbydevices-pa";
  502. + "trk:100:https://www.googleapis.com/auth/nearbydevices-pa";
  503. // OAuth2 scope for access to nearby sharing.
  504. const char kNearbyShareOAuth2Scope[] =
  505. - "https://www.googleapis.com/auth/nearbysharing-pa";
  506. + "trk:101:https://www.googleapis.com/auth/nearbysharing-pa";
  507. // OAuth2 scope for access to nearby sharing.
  508. const char kNearbyPresenceOAuth2Scope[] =
  509. - "https://www.googleapis.com/auth/nearbypresence-pa";
  510. + "trk:114:https://www.googleapis.com/auth/nearbypresence-pa";
  511. // OAuth2 scopes for access to GCM account tracker.
  512. -const char kGCMGroupServerOAuth2Scope[] = "https://www.googleapis.com/auth/gcm";
  513. +const char kGCMGroupServerOAuth2Scope[] = "trk:102:https://www.googleapis.com/auth/gcm";
  514. const char kGCMCheckinServerOAuth2Scope[] =
  515. - "https://www.googleapis.com/auth/android_checkin";
  516. + "trk:103:https://www.googleapis.com/auth/android_checkin";
  517. // OAuth2 scope for access to readonly Chrome web store.
  518. const char kChromeWebstoreOAuth2Scope[] =
  519. - "https://www.googleapis.com/auth/chromewebstore.readonly";
  520. + "trk:104:https://www.googleapis.com/auth/chromewebstore.readonly";
  521. // OAuth2 scope for access to Account Capabilities API.
  522. const char kAccountCapabilitiesOAuth2Scope[] =
  523. - "https://www.googleapis.com/auth/account.capabilities";
  524. + "trk:105:https://www.googleapis.com/auth/account.capabilities";
  525. // OAuth2 scope for support content API.
  526. const char kSupportContentOAuth2Scope[] =
  527. - "https://www.googleapis.com/auth/supportcontent";
  528. + "trk:106:https://www.googleapis.com/auth/supportcontent";
  529. // OAuth 2 scope for NTP Photos module API.
  530. const char kPhotosModuleOAuth2Scope[] =
  531. - "https://www.googleapis.com/auth/photos.firstparty.readonly";
  532. + "trk:107:https://www.googleapis.com/auth/photos.firstparty.readonly";
  533. // OAuth 2 scope for NTP Photos module image API.
  534. const char kPhotosModuleImageOAuth2Scope[] =
  535. - "https://www.googleapis.com/auth/photos.image.readonly";
  536. + "trk:108:https://www.googleapis.com/auth/photos.image.readonly";
  537. // OAuth 2 scope for the Discover feed.
  538. const char kFeedOAuth2Scope[] = "https://www.googleapis.com/auth/googlenow";
  539. --- a/google_apis/gaia/gaia_urls.cc
  540. +++ b/google_apis/gaia/gaia_urls.cc
  541. @@ -24,6 +24,7 @@
  542. namespace {
  543. // Gaia service constants
  544. +//adding trk: here currently crashes the program
  545. const char kDefaultGoogleUrl[] = "http://google.com";
  546. const char kDefaultGaiaUrl[] = "https://accounts.google.com";
  547. const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com";
  548. --- a/google_apis/gcm/engine/gservices_settings.cc
  549. +++ b/google_apis/gcm/engine/gservices_settings.cc
  550. @@ -29,18 +29,18 @@ const char kRegistrationURLKey[] = "gcm_
  551. const int64_t kDefaultCheckinInterval = 2 * 24 * 60 * 60; // seconds = 2 days.
  552. const int64_t kMinimumCheckinInterval = 12 * 60 * 60; // seconds = 12 hours.
  553. -const char kDefaultCheckinURL[] = "https://android.clients.google.com/checkin";
  554. +const char kDefaultCheckinURL[] = "trk:110:https://android.clients.google.com/checkin";
  555. const char kDefaultMCSHostname[] = "mtalk.google.com";
  556. const int kDefaultMCSMainSecurePort = 5228;
  557. const int kDefaultMCSFallbackSecurePort = 443;
  558. const char kDefaultRegistrationURL[] =
  559. - "https://android.clients.google.com/c2dm/register3";
  560. + "trk:111:https://android.clients.google.com/c2dm/register3";
  561. // Settings that are to be deleted are marked with this prefix in checkin
  562. // response.
  563. const char kDeleteSettingPrefix[] = "delete_";
  564. // Settings digest starts with verison number followed by '-'.
  565. const char kDigestVersionPrefix[] = "1-";
  566. -const char kMCSEnpointTemplate[] = "https://%s:%d";
  567. +const char kMCSEnpointTemplate[] = "trk:112:https://%s:%d";
  568. const int kMaxSecurePort = 65535;
  569. std::string MakeMCSEndpoint(const std::string& mcs_hostname, int port) {
  570. --- a/remoting/protocol/jingle_messages.cc
  571. +++ b/remoting/protocol/jingle_messages.cc
  572. @@ -28,7 +28,7 @@ const char kJabberNamespace[] = "jabber:
  573. const char kJingleNamespace[] = "urn:xmpp:jingle:1";
  574. // Namespace for transport messages when using standard ICE.
  575. -const char kIceTransportNamespace[] = "google:remoting:ice";
  576. +const char kIceTransportNamespace[] = "trk:100:google:remoting:ice";
  577. const char kWebrtcTransportNamespace[] = "google:remoting:webrtc";
  578. --- a/rlz/lib/lib_values.cc
  579. +++ b/rlz/lib/lib_values.cc
  580. @@ -40,7 +40,7 @@ const char kSetDccResponseVariable[] = "
  581. //
  582. const char kFinancialPingPath[] = "/tools/pso/ping";
  583. -const char kFinancialServer[] = "clients1.google.com";
  584. +const char kFinancialServer[] = "trk:443:clients1.google.com"; /* not using URLRequest! catch with cache.ir */
  585. const int kFinancialPort = 443;
  586. // Ping times in 100-nanosecond intervals.
  587. --- a/ui/views/examples/webview_example.cc
  588. +++ b/ui/views/examples/webview_example.cc
  589. @@ -28,7 +28,7 @@ void WebViewExample::CreateExampleView(V
  590. webview_->GetWebContents()->SetDelegate(this);
  591. container->SetLayoutManager(std::make_unique<FillLayout>());
  592. - webview_->LoadInitialURL(GURL("http://www.google.com/"));
  593. + webview_->LoadInitialURL(GURL("trk:174:http://www.google.com/"));
  594. webview_->GetWebContents()->Focus();
  595. }