hasufell-repository/packages/net-www/inox/files/inox/disable-autofill-download-m...

61 lines
2.3 KiB
Diff

--- ./components/autofill/core/browser/autofill_download_manager.cc
+++ ./components/autofill/core/browser/autofill_download_manager.cc.new
@@ -57,8 +57,7 @@
}
GURL GetRequestUrl(AutofillDownloadManager::RequestType request_type) {
- return GURL("https://clients1.google.com/tbproxy/af/" +
- RequestTypeToString(request_type) + "?client=" + kClientName);
+ return GURL("about:blank");
}
} // namespace
@@ -190,46 +189,6 @@
bool AutofillDownloadManager::StartRequest(
const std::string& form_xml,
const FormRequestData& request_data) {
- net::URLRequestContextGetter* request_context =
- driver_->GetURLRequestContext();
- DCHECK(request_context);
- GURL request_url = GetRequestUrl(request_data.request_type);
-
- std::string compressed_data;
- if (!compression::GzipCompress(form_xml, &compressed_data)) {
- NOTREACHED();
- return false;
- }
-
- AutofillMetrics::LogPayloadCompressionRatio(
- static_cast<int>(100 * compressed_data.size() / form_xml.size()),
- request_data.request_type);
-
- // Id is ignored for regular chrome, in unit test id's for fake fetcher
- // factory will be 0, 1, 2, ...
- net::URLFetcher* fetcher =
- net::URLFetcher::Create(fetcher_id_for_unittest_++, request_url,
- net::URLFetcher::POST, this).release();
- data_use_measurement::DataUseUserData::AttachToFetcher(
- fetcher, data_use_measurement::DataUseUserData::AUTOFILL);
- url_fetchers_[fetcher] = request_data;
- fetcher->SetAutomaticallyRetryOn5xx(false);
- fetcher->SetRequestContext(request_context);
- fetcher->SetUploadData("text/xml", compressed_data);
- fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
- net::LOAD_DO_NOT_SEND_COOKIES);
- // Add Chrome experiment state and GZIP encoding to the request headers.
- net::HttpRequestHeaders headers;
- headers.SetHeaderIfMissing("content-encoding", "gzip");
- variations::VariationsHttpHeaderProvider::GetInstance()->AppendHeaders(
- fetcher->GetOriginalURL(), driver_->IsOffTheRecord(), false, &headers);
- fetcher->SetExtraRequestHeaders(headers.ToString());
- fetcher->Start();
-
- VLOG(1) << "Sending AutofillDownloadManager "
- << RequestTypeToString(request_data.request_type)
- << " request: " << form_xml;
-
return true;
}