-
Notifications
You must be signed in to change notification settings - Fork 0
/
001.patch
59 lines (55 loc) · 2.3 KB
/
001.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
52
53
54
55
56
57
58
59
--- a/components/autofill/core/browser/autofill_download_manager.cc
2018-05-20 06:08:17.000000000 -0400
+++ b/components/autofill/core/browser/autofill_download_manager.cc.new
2018-05-20 13:20:49.384121377 -0400
@@ -73,7 +73,7 @@
};
const char kDefaultAutofillServerURL[] =
- "https://clients1.google.com/tbproxy/af/";
+ "about:blank";
// Returns the base URL for the autofill server.
GURL GetAutofillServerURL() {
@@ -441,45 +441,6 @@
}
bool AutofillDownloadManager::StartRequest(FormRequestData request_data) {
- scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
- driver_->GetURLLoaderFactory();
- DCHECK(url_loader_factory);
-
- // Get the URL and method to use for this request.
- std::string method;
- GURL request_url;
- std::tie(request_url, method) = GetRequestURLAndMethod(request_data);
-
- auto resource_request = std::make_unique<network::ResourceRequest>();
- resource_request->url = request_url;
- resource_request->load_flags =
- net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES;
- resource_request->method = method;
-
- // Add Chrome experiment state to the request headers.
- variations::AppendVariationHeadersUnknownSignedIn(
- request_url,
- driver_->IsIncognito() ? variations::InIncognito::kYes
- : variations::InIncognito::kNo,
- &resource_request->headers);
-
- auto simple_loader = network::SimpleURLLoader::Create(
- std::move(resource_request),
- GetNetworkTrafficAnnotation(request_data.request_type));
- if (method == "POST")
- simple_loader->AttachStringForUpload(request_data.payload, "text/proto");
-
- // Transfer ownership of the loader into url_loaders_. Temporarily hang
- // onto the raw pointer to use it as a key and to kick off the request;
- // transferring ownership (std::move) invalidates the |simple_loader|
- // variable.
- auto* raw_simple_loader = simple_loader.get();
- url_loaders_.push_back(std::move(simple_loader));
- raw_simple_loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
- url_loader_factory.get(),
- base::BindOnce(&AutofillDownloadManager::OnSimpleLoaderComplete,
- base::Unretained(this), std::move(--url_loaders_.end()),
- std::move(request_data), base::TimeTicks::Now()));
return true;
}