--- a/components/web_resource/web_resource_service.cc +++ b/components/web_resource/web_resource_service.cc @@ -127,44 +127,7 @@ bool WebResourceService::GetFetchSchedul // 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::NumberToString(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() {