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

Side by Side Diff: net/url_request/url_fetcher_impl.cc

Issue 63923002: net: Use SequencedTaskRunner for URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add include Created 7 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/url_request/url_fetcher_impl.h" 5 #include "net/url_request/url_fetcher_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/sequenced_task_runner.h"
9 #include "net/url_request/url_fetcher_core.h" 10 #include "net/url_request/url_fetcher_core.h"
10 #include "net/url_request/url_fetcher_factory.h" 11 #include "net/url_request/url_fetcher_factory.h"
11 #include "net/url_request/url_fetcher_response_writer.h" 12 #include "net/url_request/url_fetcher_response_writer.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 static URLFetcherFactory* g_factory = NULL; 16 static URLFetcherFactory* g_factory = NULL;
16 17
17 URLFetcherImpl::URLFetcherImpl(const GURL& url, 18 URLFetcherImpl::URLFetcherImpl(const GURL& url,
18 RequestType request_type, 19 RequestType request_type,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 base::TimeDelta URLFetcherImpl::GetBackoffDelay() const { 115 base::TimeDelta URLFetcherImpl::GetBackoffDelay() const {
115 return core_->GetBackoffDelay(); 116 return core_->GetBackoffDelay();
116 } 117 }
117 118
118 void URLFetcherImpl::SetAutomaticallyRetryOnNetworkChanges(int max_retries) { 119 void URLFetcherImpl::SetAutomaticallyRetryOnNetworkChanges(int max_retries) {
119 core_->SetAutomaticallyRetryOnNetworkChanges(max_retries); 120 core_->SetAutomaticallyRetryOnNetworkChanges(max_retries);
120 } 121 }
121 122
122 void URLFetcherImpl::SaveResponseToFileAtPath( 123 void URLFetcherImpl::SaveResponseToFileAtPath(
123 const base::FilePath& file_path, 124 const base::FilePath& file_path,
124 scoped_refptr<base::TaskRunner> file_task_runner) { 125 scoped_refptr<base::SequencedTaskRunner> file_task_runner) {
125 core_->SaveResponseToFileAtPath(file_path, file_task_runner); 126 core_->SaveResponseToFileAtPath(file_path, file_task_runner);
126 } 127 }
127 128
128 void URLFetcherImpl::SaveResponseToTemporaryFile( 129 void URLFetcherImpl::SaveResponseToTemporaryFile(
129 scoped_refptr<base::TaskRunner> file_task_runner) { 130 scoped_refptr<base::SequencedTaskRunner> file_task_runner) {
130 core_->SaveResponseToTemporaryFile(file_task_runner); 131 core_->SaveResponseToTemporaryFile(file_task_runner);
131 } 132 }
132 133
133 void URLFetcherImpl::SaveResponseWithWriter( 134 void URLFetcherImpl::SaveResponseWithWriter(
134 scoped_ptr<URLFetcherResponseWriter> response_writer) { 135 scoped_ptr<URLFetcherResponseWriter> response_writer) {
135 core_->SaveResponseWithWriter(response_writer.Pass()); 136 core_->SaveResponseWithWriter(response_writer.Pass());
136 } 137 }
137 138
138 HttpResponseHeaders* URLFetcherImpl::GetResponseHeaders() const { 139 HttpResponseHeaders* URLFetcherImpl::GetResponseHeaders() const {
139 return core_->GetResponseHeaders(); 140 return core_->GetResponseHeaders();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 URLFetcherFactory* URLFetcherImpl::factory() { 215 URLFetcherFactory* URLFetcherImpl::factory() {
215 return g_factory; 216 return g_factory;
216 } 217 }
217 218
218 // static 219 // static
219 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { 220 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) {
220 g_factory = factory; 221 g_factory = factory;
221 } 222 }
222 223
223 } // namespace net 224 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698