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

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

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | net/url_request/url_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test_url_fetcher_factory.h" 5 #include "net/url_request/test_url_fetcher_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const void* key, 107 const void* key,
108 const CreateDataCallback& create_data_callback) { 108 const CreateDataCallback& create_data_callback) {
109 } 109 }
110 110
111 void TestURLFetcher::SetStopOnRedirect(bool stop_on_redirect) { 111 void TestURLFetcher::SetStopOnRedirect(bool stop_on_redirect) {
112 } 112 }
113 113
114 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) { 114 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) {
115 } 115 }
116 116
117 void TestURLFetcher::SetMaxRetries(int max_retries) { 117 void TestURLFetcher::SetMaxRetriesOn5xx(int max_retries) {
118 fake_max_retries_ = max_retries; 118 fake_max_retries_ = max_retries;
119 } 119 }
120 120
121 int TestURLFetcher::GetMaxRetries() const { 121 int TestURLFetcher::GetMaxRetriesOn5xx() const {
122 return fake_max_retries_; 122 return fake_max_retries_;
123 } 123 }
124 124
125 base::TimeDelta TestURLFetcher::GetBackoffDelay() const { 125 base::TimeDelta TestURLFetcher::GetBackoffDelay() const {
126 return fake_backoff_delay_; 126 return fake_backoff_delay_;
127 } 127 }
128 128
129 void TestURLFetcher::SetAutomaticallyRetryOnNetworkChanges(int max_retries) {
130 }
131
129 void TestURLFetcher::SaveResponseToFileAtPath( 132 void TestURLFetcher::SaveResponseToFileAtPath(
130 const FilePath& file_path, 133 const FilePath& file_path,
131 scoped_refptr<base::TaskRunner> file_task_runner) { 134 scoped_refptr<base::TaskRunner> file_task_runner) {
132 } 135 }
133 136
134 void TestURLFetcher::SaveResponseToTemporaryFile( 137 void TestURLFetcher::SaveResponseToTemporaryFile(
135 scoped_refptr<base::TaskRunner> file_task_runner) { 138 scoped_refptr<base::TaskRunner> file_task_runner) {
136 } 139 }
137 140
138 HttpResponseHeaders* TestURLFetcher::GetResponseHeaders() const { 141 HttpResponseHeaders* TestURLFetcher::GetResponseHeaders() const {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 363
361 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( 364 URLFetcher* URLFetcherImplFactory::CreateURLFetcher(
362 int id, 365 int id,
363 const GURL& url, 366 const GURL& url,
364 URLFetcher::RequestType request_type, 367 URLFetcher::RequestType request_type,
365 URLFetcherDelegate* d) { 368 URLFetcherDelegate* d) {
366 return new URLFetcherImpl(url, request_type, d); 369 return new URLFetcherImpl(url, request_type, d);
367 } 370 }
368 371
369 } // namespace net 372 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/test_url_fetcher_factory.h ('k') | net/url_request/url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698