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