This repository has been archived by the owner on Mar 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
0003-disable-autofill-download-manager.patch
51 lines (47 loc) · 2.34 KB
/
0003-disable-autofill-download-manager.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- a/components/autofill/core/browser/autofill_download_manager.cc
+++ b/components/autofill/core/browser/autofill_download_manager.cc
@@ -158,8 +158,7 @@ std::string RequestTypeToString(Autofill
}
GURL GetRequestUrl(AutofillDownloadManager::RequestType request_type) {
- return GURL("https://clients1.google.com/tbproxy/af/" +
- RequestTypeToString(request_type) + "?client=" + kClientName);
+ return GURL("about:blank");
}
std::ostream& operator<<(std::ostream& out,
@@ -299,38 +298,6 @@ bool AutofillDownloadManager::StartUploa
bool AutofillDownloadManager::StartRequest(
const FormRequestData& request_data) {
- net::URLRequestContextGetter* request_context =
- driver_->GetURLRequestContext();
- DCHECK(request_context);
- GURL request_url = GetRequestUrl(request_data.request_type);
-
- // Id is ignored for regular chrome, in unit test id's for fake fetcher
- // factory will be 0, 1, 2, ...
- std::unique_ptr<net::URLFetcher> owned_fetcher = net::URLFetcher::Create(
- fetcher_id_for_unittest_++, request_url, net::URLFetcher::POST, this,
- GetNetworkTrafficAnnotation(request_data.request_type));
- net::URLFetcher* fetcher = owned_fetcher.get();
- data_use_measurement::DataUseUserData::AttachToFetcher(
- fetcher, data_use_measurement::DataUseUserData::AUTOFILL);
- url_fetchers_[fetcher] =
- std::make_pair(std::move(owned_fetcher), request_data);
- fetcher->SetAutomaticallyRetryOn5xx(false);
- fetcher->SetRequestContext(request_context);
- fetcher->SetUploadData("text/proto", request_data.payload);
- fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
- net::LOAD_DO_NOT_SEND_COOKIES);
- // Add Chrome experiment state to the request headers.
- net::HttpRequestHeaders headers;
- // Note: It's OK to pass SignedIn::kNo if it's unknown, as it does not affect
- // transmission of experiments coming from the variations server.
- variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
- driver_->IsIncognito()
- ? variations::InIncognito::kYes
- : variations::InIncognito::kNo,
- variations::SignedIn::kNo, &headers);
- fetcher->SetExtraRequestHeaders(headers.ToString());
- fetcher->Start();
-
return true;
}