OLD | NEW |
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 "content/test/test_url_fetcher_factory.h" | 5 #include "content/test/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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 void TestURLFetcher::GetExtraRequestHeaders(net::HttpRequestHeaders* headers) { | 83 void TestURLFetcher::GetExtraRequestHeaders(net::HttpRequestHeaders* headers) { |
84 *headers = fake_extra_request_headers_; | 84 *headers = fake_extra_request_headers_; |
85 } | 85 } |
86 | 86 |
87 void TestURLFetcher::SetRequestContext( | 87 void TestURLFetcher::SetRequestContext( |
88 net::URLRequestContextGetter* request_context_getter) { | 88 net::URLRequestContextGetter* request_context_getter) { |
89 } | 89 } |
90 | 90 |
| 91 void TestURLFetcher::AssociateWithRenderView(int process_id, int routing_id) { |
| 92 } |
| 93 |
91 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) { | 94 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) { |
92 } | 95 } |
93 | 96 |
94 void TestURLFetcher::SetMaxRetries(int max_retries) { | 97 void TestURLFetcher::SetMaxRetries(int max_retries) { |
95 fake_max_retries_ = max_retries; | 98 fake_max_retries_ = max_retries; |
96 } | 99 } |
97 | 100 |
98 int TestURLFetcher::GetMaxRetries() const { | 101 int TestURLFetcher::GetMaxRetries() const { |
99 return fake_max_retries_; | 102 return fake_max_retries_; |
100 } | 103 } |
(...skipping 16 matching lines...) Expand all Loading... |
117 } | 120 } |
118 | 121 |
119 bool TestURLFetcher::WasFetchedViaProxy() const { | 122 bool TestURLFetcher::WasFetchedViaProxy() const { |
120 return fake_was_fetched_via_proxy_; | 123 return fake_was_fetched_via_proxy_; |
121 } | 124 } |
122 | 125 |
123 void TestURLFetcher::Start() { | 126 void TestURLFetcher::Start() { |
124 // Overriden to do nothing. It is assumed the caller will notify the delegate. | 127 // Overriden to do nothing. It is assumed the caller will notify the delegate. |
125 } | 128 } |
126 | 129 |
127 void TestURLFetcher::StartWithRequestContextGetter( | |
128 net::URLRequestContextGetter* request_context_getter) { | |
129 NOTIMPLEMENTED(); | |
130 } | |
131 | |
132 const GURL& TestURLFetcher::GetOriginalURL() const { | 130 const GURL& TestURLFetcher::GetOriginalURL() const { |
133 return original_url_; | 131 return original_url_; |
134 } | 132 } |
135 | 133 |
136 const GURL& TestURLFetcher::GetURL() const { | 134 const GURL& TestURLFetcher::GetURL() const { |
137 return fake_url_; | 135 return fake_url_; |
138 } | 136 } |
139 | 137 |
140 const net::URLRequestStatus& TestURLFetcher::GetStatus() const { | 138 const net::URLRequestStatus& TestURLFetcher::GetStatus() const { |
141 return fake_status_; | 139 return fake_status_; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 318 |
321 URLFetcherImplFactory::~URLFetcherImplFactory() {} | 319 URLFetcherImplFactory::~URLFetcherImplFactory() {} |
322 | 320 |
323 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher( | 321 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher( |
324 int id, | 322 int id, |
325 const GURL& url, | 323 const GURL& url, |
326 content::URLFetcher::RequestType request_type, | 324 content::URLFetcher::RequestType request_type, |
327 content::URLFetcherDelegate* d) { | 325 content::URLFetcherDelegate* d) { |
328 return new URLFetcherImpl(url, request_type, d); | 326 return new URLFetcherImpl(url, request_type, d); |
329 } | 327 } |
OLD | NEW |