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

Side by Side Diff: content/test/test_url_fetcher_factory.cc

Issue 9572001: Do cookie checks in NetworkDelegate instead of the URLRequest::Delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 9 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
« no previous file with comments | « content/test/test_url_fetcher_factory.h ('k') | net/base/network_delegate.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 "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
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(
92 const GURL& first_party_for_cookies,
93 int render_process_id,
94 int render_view_id) {
95 }
96
91 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) { 97 void TestURLFetcher::SetAutomaticallyRetryOn5xx(bool retry) {
92 } 98 }
93 99
94 void TestURLFetcher::SetMaxRetries(int max_retries) { 100 void TestURLFetcher::SetMaxRetries(int max_retries) {
95 fake_max_retries_ = max_retries; 101 fake_max_retries_ = max_retries;
96 } 102 }
97 103
98 int TestURLFetcher::GetMaxRetries() const { 104 int TestURLFetcher::GetMaxRetries() const {
99 return fake_max_retries_; 105 return fake_max_retries_;
100 } 106 }
(...skipping 16 matching lines...) Expand all
117 } 123 }
118 124
119 bool TestURLFetcher::WasFetchedViaProxy() const { 125 bool TestURLFetcher::WasFetchedViaProxy() const {
120 return fake_was_fetched_via_proxy_; 126 return fake_was_fetched_via_proxy_;
121 } 127 }
122 128
123 void TestURLFetcher::Start() { 129 void TestURLFetcher::Start() {
124 // Overriden to do nothing. It is assumed the caller will notify the delegate. 130 // Overriden to do nothing. It is assumed the caller will notify the delegate.
125 } 131 }
126 132
127 void TestURLFetcher::StartWithRequestContextGetter(
128 net::URLRequestContextGetter* request_context_getter) {
129 NOTIMPLEMENTED();
130 }
131
132 const GURL& TestURLFetcher::GetOriginalURL() const { 133 const GURL& TestURLFetcher::GetOriginalURL() const {
133 return original_url_; 134 return original_url_;
134 } 135 }
135 136
136 const GURL& TestURLFetcher::GetURL() const { 137 const GURL& TestURLFetcher::GetURL() const {
137 return fake_url_; 138 return fake_url_;
138 } 139 }
139 140
140 const net::URLRequestStatus& TestURLFetcher::GetStatus() const { 141 const net::URLRequestStatus& TestURLFetcher::GetStatus() const {
141 return fake_status_; 142 return fake_status_;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 321
321 URLFetcherImplFactory::~URLFetcherImplFactory() {} 322 URLFetcherImplFactory::~URLFetcherImplFactory() {}
322 323
323 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher( 324 content::URLFetcher* URLFetcherImplFactory::CreateURLFetcher(
324 int id, 325 int id,
325 const GURL& url, 326 const GURL& url,
326 content::URLFetcher::RequestType request_type, 327 content::URLFetcher::RequestType request_type,
327 content::URLFetcherDelegate* d) { 328 content::URLFetcherDelegate* d) {
328 return new URLFetcherImpl(url, request_type, d); 329 return new URLFetcherImpl(url, request_type, d);
329 } 330 }
OLDNEW
« no previous file with comments | « content/test/test_url_fetcher_factory.h ('k') | net/base/network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698