Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/policy/cloud/external_policy_data_updater.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/policy/cloud/external_policy_data_updater.h" 5 #include "chrome/browser/policy/cloud/external_policy_data_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 const ExternalPolicyDataUpdater::Request& 212 const ExternalPolicyDataUpdater::Request&
213 ExternalPolicyDataUpdater::FetchJob::request() const { 213 ExternalPolicyDataUpdater::FetchJob::request() const {
214 return request_; 214 return request_;
215 } 215 }
216 216
217 void ExternalPolicyDataUpdater::FetchJob::Start() { 217 void ExternalPolicyDataUpdater::FetchJob::Start() {
218 fetcher_.reset(net::URLFetcher::Create(id_, GURL(request_.url), 218 fetcher_.reset(net::URLFetcher::Create(id_, GURL(request_.url),
219 net::URLFetcher::GET, this)); 219 net::URLFetcher::GET, this));
220 fetcher_->SetRequestContext(updater_->request_context_); 220 fetcher_->SetRequestContext(updater_->request_context_.get());
221 fetcher_->SetLoadFlags(net::LOAD_BYPASS_CACHE | 221 fetcher_->SetLoadFlags(net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
222 net::LOAD_DISABLE_CACHE | 222 net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_IS_DOWNLOAD |
223 net::LOAD_DO_NOT_SAVE_COOKIES |
224 net::LOAD_IS_DOWNLOAD |
225 net::LOAD_DO_NOT_SEND_COOKIES | 223 net::LOAD_DO_NOT_SEND_COOKIES |
226 net::LOAD_DO_NOT_SEND_AUTH_DATA); 224 net::LOAD_DO_NOT_SEND_AUTH_DATA);
227 fetcher_->SetAutomaticallyRetryOnNetworkChanges(3); 225 fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
228 fetcher_->Start(); 226 fetcher_->Start();
229 } 227 }
230 228
231 void ExternalPolicyDataUpdater::FetchJob::OnURLFetchComplete( 229 void ExternalPolicyDataUpdater::FetchJob::OnURLFetchComplete(
232 const net::URLFetcher* source) { 230 const net::URLFetcher* source) {
233 DCHECK_EQ(fetcher_.get(), source); 231 DCHECK_EQ(fetcher_.get(), source);
234 232
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 DCHECK_EQ(job_map_[job->key()], job); 422 DCHECK_EQ(job_map_[job->key()], job);
425 423
426 --running_jobs_; 424 --running_jobs_;
427 425
428 // The job is not deleted when it fails because a retry attempt may have been 426 // The job is not deleted when it fails because a retry attempt may have been
429 // scheduled. 427 // scheduled.
430 StartNextJobs(); 428 StartNextJobs();
431 } 429 }
432 430
433 } // namespace policy 431 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698