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 "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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 fake_load_flags_= load_flags; | 85 fake_load_flags_= load_flags; |
86 } | 86 } |
87 | 87 |
88 int TestURLFetcher::GetLoadFlags() const { | 88 int TestURLFetcher::GetLoadFlags() const { |
89 return fake_load_flags_; | 89 return fake_load_flags_; |
90 } | 90 } |
91 | 91 |
92 void TestURLFetcher::SetReferrer(const std::string& referrer) { | 92 void TestURLFetcher::SetReferrer(const std::string& referrer) { |
93 } | 93 } |
94 | 94 |
| 95 void TestURLFetcher::SetReferrerPolicy( |
| 96 URLRequest::ReferrerPolicy referrer_policy) { |
| 97 } |
| 98 |
95 void TestURLFetcher::SetExtraRequestHeaders( | 99 void TestURLFetcher::SetExtraRequestHeaders( |
96 const std::string& extra_request_headers) { | 100 const std::string& extra_request_headers) { |
97 fake_extra_request_headers_.Clear(); | 101 fake_extra_request_headers_.Clear(); |
98 fake_extra_request_headers_.AddHeadersFromString(extra_request_headers); | 102 fake_extra_request_headers_.AddHeadersFromString(extra_request_headers); |
99 } | 103 } |
100 | 104 |
101 void TestURLFetcher::AddExtraRequestHeader(const std::string& header_line) { | 105 void TestURLFetcher::AddExtraRequestHeader(const std::string& header_line) { |
102 fake_extra_request_headers_.AddHeaderFromString(header_line); | 106 fake_extra_request_headers_.AddHeaderFromString(header_line); |
103 } | 107 } |
104 | 108 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 | 418 |
415 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( | 419 URLFetcher* URLFetcherImplFactory::CreateURLFetcher( |
416 int id, | 420 int id, |
417 const GURL& url, | 421 const GURL& url, |
418 URLFetcher::RequestType request_type, | 422 URLFetcher::RequestType request_type, |
419 URLFetcherDelegate* d) { | 423 URLFetcherDelegate* d) { |
420 return new URLFetcherImpl(url, request_type, d); | 424 return new URLFetcherImpl(url, request_type, d); |
421 } | 425 } |
422 | 426 |
423 } // namespace net | 427 } // namespace net |
OLD | NEW |