summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch')
-rw-r--r--www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch
new file mode 100644
index 0000000..bc27e5d
--- /dev/null
+++ b/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch
@@ -0,0 +1,71 @@
1# Disables Gaia code
2# Somehow it is still activated even without being signed-in: https://github.com/Eloston/ungoogled-chromium/issues/104
3
4--- google_apis/gaia/gaia_auth_fetcher.cc.orig
5+++ google_apis/gaia/gaia_auth_fetcher.cc
6@@ -293,65 +293,6 @@ void GaiaAuthFetcher::CreateAndStartGaia
7 network::mojom::CredentialsMode credentials_mode,
8 const net::NetworkTrafficAnnotationTag& traffic_annotation) {
9 DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
10-
11- auto resource_request = std::make_unique<network::ResourceRequest>();
12- resource_request->url = gaia_gurl;
13- original_url_ = gaia_gurl;
14-
15- if (credentials_mode != network::mojom::CredentialsMode::kOmit) {
16- DCHECK_EQ(GaiaUrls::GetInstance()->gaia_url(), gaia_gurl.GetOrigin())
17- << gaia_gurl;
18- url::Origin origin =
19- url::Origin::Create(GaiaUrls::GetInstance()->gaia_url());
20- resource_request->site_for_cookies =
21- net::SiteForCookies::FromOrigin(origin);
22- resource_request->trusted_params =
23- network::ResourceRequest::TrustedParams();
24- resource_request->trusted_params->isolation_info =
25- net::IsolationInfo::CreateForInternalRequest(origin);
26- }
27-
28- if (!body.empty())
29- resource_request->method = "POST";
30-
31- if (!headers.empty())
32- resource_request->headers.AddHeadersFromString(headers);
33-
34- // The Gaia token exchange requests do not require any cookie-based
35- // identification as part of requests. We suppress sending any cookies to
36- // maintain a separation between the user's browsing and Chrome's internal
37- // services. Where such mixing is desired (MergeSession or OAuthLogin), it
38- // will be done explicitly.
39- resource_request->credentials_mode = credentials_mode;
40-
41- url_loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
42- traffic_annotation);
43- if (!body.empty()) {
44- DCHECK(!body_content_type.empty());
45- url_loader_->AttachStringForUpload(body, body_content_type);
46- }
47-
48- url_loader_->SetAllowHttpErrorResults(true);
49-
50- VLOG(2) << "Gaia fetcher URL: " << gaia_gurl.spec();
51- VLOG(2) << "Gaia fetcher headers: " << headers;
52- VLOG(2) << "Gaia fetcher body: " << body;
53-
54- // Fetchers are sometimes cancelled because a network change was detected,
55- // especially at startup and after sign-in on ChromeOS. Retrying once should
56- // be enough in those cases; let the fetcher retry up to 3 times just in case.
57- // http://crbug.com/163710
58- url_loader_->SetRetryOptions(
59- 3, network::SimpleURLLoader::RETRY_ON_NETWORK_CHANGE);
60-
61- fetch_pending_ = true;
62-
63- // Unretained is OK below as |url_loader_| is owned by this.
64- url_loader_->DownloadToString(
65- url_loader_factory_.get(),
66- base::BindOnce(&GaiaAuthFetcher::OnURLLoadComplete,
67- base::Unretained(this)),
68- kMaxMessageSize);
69 }
70
71 // static