OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/net/url_fetcher.h" | 5 #include "chrome/common/net/url_fetcher.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
11 #include "chrome/common/net/url_fetcher_protect.h" | 11 #include "chrome/common/net/url_fetcher_protect.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 const std::string& extra_request_headers) { | 349 const std::string& extra_request_headers) { |
350 core_->extra_request_headers_.Clear(); | 350 core_->extra_request_headers_.Clear(); |
351 core_->extra_request_headers_.AddHeadersFromString(extra_request_headers); | 351 core_->extra_request_headers_.AddHeadersFromString(extra_request_headers); |
352 } | 352 } |
353 | 353 |
354 void URLFetcher::set_request_context( | 354 void URLFetcher::set_request_context( |
355 URLRequestContextGetter* request_context_getter) { | 355 URLRequestContextGetter* request_context_getter) { |
356 core_->request_context_getter_ = request_context_getter; | 356 core_->request_context_getter_ = request_context_getter; |
357 } | 357 } |
358 | 358 |
359 void URLFetcher::set_automatcally_retry_on_5xx(bool retry) { | 359 void URLFetcher::set_automatically_retry_on_5xx(bool retry) { |
360 automatically_retry_on_5xx_ = retry; | 360 automatically_retry_on_5xx_ = retry; |
361 } | 361 } |
362 | 362 |
363 net::HttpResponseHeaders* URLFetcher::response_headers() const { | 363 net::HttpResponseHeaders* URLFetcher::response_headers() const { |
364 return core_->response_headers_; | 364 return core_->response_headers_; |
365 } | 365 } |
366 | 366 |
367 void URLFetcher::Start() { | 367 void URLFetcher::Start() { |
368 core_->Start(); | 368 core_->Start(); |
369 } | 369 } |
370 | 370 |
371 const GURL& URLFetcher::url() const { | 371 const GURL& URLFetcher::url() const { |
372 return core_->url_; | 372 return core_->url_; |
373 } | 373 } |
374 | 374 |
375 URLFetcher::Delegate* URLFetcher::delegate() const { | 375 URLFetcher::Delegate* URLFetcher::delegate() const { |
376 return core_->delegate(); | 376 return core_->delegate(); |
377 } | 377 } |
OLD | NEW |