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/url_fetcher_impl.h" | 5 #include "net/url_request/url_fetcher_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
10 #include "net/url_request/url_fetcher_core.h" | 10 #include "net/url_request/url_fetcher_core.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 void URLFetcherImpl::AppendChunkToUpload(const std::string& data, | 50 void URLFetcherImpl::AppendChunkToUpload(const std::string& data, |
51 bool is_last_chunk) { | 51 bool is_last_chunk) { |
52 DCHECK(data.length()); | 52 DCHECK(data.length()); |
53 core_->AppendChunkToUpload(data, is_last_chunk); | 53 core_->AppendChunkToUpload(data, is_last_chunk); |
54 } | 54 } |
55 | 55 |
56 void URLFetcherImpl::SetReferrer(const std::string& referrer) { | 56 void URLFetcherImpl::SetReferrer(const std::string& referrer) { |
57 core_->SetReferrer(referrer); | 57 core_->SetReferrer(referrer); |
58 } | 58 } |
59 | 59 |
| 60 void URLFetcherImpl::SetReferrerPolicy( |
| 61 URLRequest::ReferrerPolicy referrer_policy) { |
| 62 core_->SetReferrerPolicy(referrer_policy); |
| 63 } |
| 64 |
60 void URLFetcherImpl::SetLoadFlags(int load_flags) { | 65 void URLFetcherImpl::SetLoadFlags(int load_flags) { |
61 core_->SetLoadFlags(load_flags); | 66 core_->SetLoadFlags(load_flags); |
62 } | 67 } |
63 | 68 |
64 int URLFetcherImpl::GetLoadFlags() const { | 69 int URLFetcherImpl::GetLoadFlags() const { |
65 return core_->GetLoadFlags(); | 70 return core_->GetLoadFlags(); |
66 } | 71 } |
67 | 72 |
68 void URLFetcherImpl::SetExtraRequestHeaders( | 73 void URLFetcherImpl::SetExtraRequestHeaders( |
69 const std::string& extra_request_headers) { | 74 const std::string& extra_request_headers) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 URLFetcherFactory* URLFetcherImpl::factory() { | 215 URLFetcherFactory* URLFetcherImpl::factory() { |
211 return g_factory; | 216 return g_factory; |
212 } | 217 } |
213 | 218 |
214 // static | 219 // static |
215 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { | 220 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { |
216 g_factory = factory; | 221 g_factory = factory; |
217 } | 222 } |
218 | 223 |
219 } // namespace net | 224 } // namespace net |
OLD | NEW |