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 | |
65 void URLFetcherImpl::SetLoadFlags(int load_flags) { | 60 void URLFetcherImpl::SetLoadFlags(int load_flags) { |
66 core_->SetLoadFlags(load_flags); | 61 core_->SetLoadFlags(load_flags); |
67 } | 62 } |
68 | 63 |
69 int URLFetcherImpl::GetLoadFlags() const { | 64 int URLFetcherImpl::GetLoadFlags() const { |
70 return core_->GetLoadFlags(); | 65 return core_->GetLoadFlags(); |
71 } | 66 } |
72 | 67 |
73 void URLFetcherImpl::SetExtraRequestHeaders( | 68 void URLFetcherImpl::SetExtraRequestHeaders( |
74 const std::string& extra_request_headers) { | 69 const std::string& extra_request_headers) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 URLFetcherFactory* URLFetcherImpl::factory() { | 210 URLFetcherFactory* URLFetcherImpl::factory() { |
216 return g_factory; | 211 return g_factory; |
217 } | 212 } |
218 | 213 |
219 // static | 214 // static |
220 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { | 215 void URLFetcherImpl::set_factory(URLFetcherFactory* factory) { |
221 g_factory = factory; | 216 g_factory = factory; |
222 } | 217 } |
223 | 218 |
224 } // namespace net | 219 } // namespace net |
OLD | NEW |