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

Side by Side Diff: components/precache/core/precache_fetcher.cc

Issue 786423002: Get rid of net::DO_NOT_PROMPT_FOR_LOGIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete flag from iOS code Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/precache/core/precache_fetcher.h" 5 #include "components/precache/core/precache_fetcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 DISALLOW_COPY_AND_ASSIGN(Fetcher); 117 DISALLOW_COPY_AND_ASSIGN(Fetcher);
118 }; 118 };
119 119
120 PrecacheFetcher::Fetcher::Fetcher( 120 PrecacheFetcher::Fetcher::Fetcher(
121 net::URLRequestContextGetter* request_context, const GURL& url, 121 net::URLRequestContextGetter* request_context, const GURL& url,
122 const base::Callback<void(const URLFetcher&)>& callback) 122 const base::Callback<void(const URLFetcher&)>& callback)
123 : callback_(callback) { 123 : callback_(callback) {
124 url_fetcher_.reset(URLFetcher::Create(url, URLFetcher::GET, this)); 124 url_fetcher_.reset(URLFetcher::Create(url, URLFetcher::GET, this));
125 url_fetcher_->SetRequestContext(request_context); 125 url_fetcher_->SetRequestContext(request_context);
126 url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_PROMPT_FOR_LOGIN);
127 url_fetcher_->Start(); 126 url_fetcher_->Start();
128 } 127 }
129 128
130 void PrecacheFetcher::Fetcher::OnURLFetchComplete(const URLFetcher* source) { 129 void PrecacheFetcher::Fetcher::OnURLFetchComplete(const URLFetcher* source) {
131 callback_.Run(*source); 130 callback_.Run(*source);
132 } 131 }
133 132
134 PrecacheFetcher::PrecacheFetcher( 133 PrecacheFetcher::PrecacheFetcher(
135 const std::list<GURL>& starting_urls, 134 const std::list<GURL>& starting_urls,
136 net::URLRequestContextGetter* request_context, 135 net::URLRequestContextGetter* request_context,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 StartNextFetch(); 247 StartNextFetch();
249 } 248 }
250 249
251 void PrecacheFetcher::OnResourceFetchComplete(const URLFetcher& source) { 250 void PrecacheFetcher::OnResourceFetchComplete(const URLFetcher& source) {
252 // The resource has already been put in the cache during the fetch process, so 251 // The resource has already been put in the cache during the fetch process, so
253 // nothing more needs to be done for the resource. 252 // nothing more needs to be done for the resource.
254 StartNextFetch(); 253 StartNextFetch();
255 } 254 }
256 255
257 } // namespace precache 256 } // namespace precache
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/affiliation_fetcher.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698