-
Notifications
You must be signed in to change notification settings - Fork 0
/
023.patcjh
48 lines (47 loc) · 1.99 KB
/
023.patcjh
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
--- components/web_resource/web_resource_service.cc 2017-10-04 18:07:40.000000000 -0400
+++ components/web_resource/web_resource_service.cc.new 2017-10-08 19:20:48.216624222 -0400
@@ -126,44 +126,7 @@
// Initializes the fetching of data from the resource server. Data
// load calls OnURLFetchComplete.
void WebResourceService::StartFetch() {
- // Set to false so that next fetch can be scheduled after this fetch or
- // if we recieve notification that resource is allowed.
- fetch_scheduled_ = false;
- // Check whether fetching is allowed.
- if (!resource_request_allowed_notifier_->ResourceRequestsAllowed())
- return;
-
- // First, put our next cache load on the MessageLoop.
- ScheduleFetch(cache_update_delay_ms_);
-
- // Set cache update time in preferences.
- prefs_->SetString(last_update_time_pref_name_,
- base::DoubleToString(base::Time::Now().ToDoubleT()));
-
- // If we are still fetching data, exit.
- if (in_fetch_)
- return;
- in_fetch_ = true;
-
- GURL web_resource_server =
- application_locale_.empty()
- ? web_resource_server_
- : google_util::AppendGoogleLocaleParam(web_resource_server_,
- application_locale_);
-
- DVLOG(1) << "WebResourceService StartFetch " << web_resource_server;
- url_fetcher_ = net::URLFetcher::Create(
- web_resource_server, net::URLFetcher::GET, this, traffic_annotation_);
- data_use_measurement::DataUseUserData::AttachToFetcher(
- url_fetcher_.get(),
- data_use_measurement::DataUseUserData::WEB_RESOURCE_SERVICE);
- // Do not let url fetcher affect existing state in system context
- // (by setting cookies, for example).
- url_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SEND_COOKIES |
- net::LOAD_DO_NOT_SAVE_COOKIES);
- url_fetcher_->SetRequestContext(request_context_.get());
- url_fetcher_->Start();
+ in_fetch_ = false;
}
void WebResourceService::EndFetch() {