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 "content/common/net/url_fetcher_core.h" | 5 #include "content/common/net/url_fetcher_core.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util_proxy.h" | 8 #include "base/file_util_proxy.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 request_context_getter_ = request_context_getter; | 399 request_context_getter_ = request_context_getter; |
400 } | 400 } |
401 | 401 |
402 void URLFetcherCore::SetFirstPartyForCookies( | 402 void URLFetcherCore::SetFirstPartyForCookies( |
403 const GURL& first_party_for_cookies) { | 403 const GURL& first_party_for_cookies) { |
404 DCHECK(first_party_for_cookies_.is_empty()); | 404 DCHECK(first_party_for_cookies_.is_empty()); |
405 first_party_for_cookies_ = first_party_for_cookies; | 405 first_party_for_cookies_ = first_party_for_cookies; |
406 } | 406 } |
407 | 407 |
408 void URLFetcherCore::SetURLRequestUserData( | 408 void URLFetcherCore::SetURLRequestUserData( |
409 const void* key, const CreateDataCallback& create_data_callback) { | 409 const void* key, |
| 410 const URLFetcher::CreateDataCallback& create_data_callback) { |
410 DCHECK(key); | 411 DCHECK(key); |
411 DCHECK(!create_data_callback.is_null()); | 412 DCHECK(!create_data_callback.is_null()); |
412 url_request_data_key_ = key; | 413 url_request_data_key_ = key; |
413 url_request_create_data_callback_ = create_data_callback; | 414 url_request_create_data_callback_ = create_data_callback; |
414 } | 415 } |
415 | 416 |
416 void URLFetcherCore::SetAutomaticallyRetryOn5xx(bool retry) { | 417 void URLFetcherCore::SetAutomaticallyRetryOn5xx(bool retry) { |
417 automatically_retry_on_5xx_ = retry; | 418 automatically_retry_on_5xx_ = retry; |
418 } | 419 } |
419 | 420 |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 } | 960 } |
960 | 961 |
961 return original_url_backoff > destination_url_backoff ? | 962 return original_url_backoff > destination_url_backoff ? |
962 original_url_backoff : destination_url_backoff; | 963 original_url_backoff : destination_url_backoff; |
963 } else { | 964 } else { |
964 return base::TimeTicks(); | 965 return base::TimeTicks(); |
965 } | 966 } |
966 } | 967 } |
967 | 968 |
968 } // namespace content | 969 } // namespace content |
OLD | NEW |