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_core.h" | 5 #include "net/url_request/url_fetcher_core.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 void URLFetcherCore::Registry::CancelAll() { | 63 void URLFetcherCore::Registry::CancelAll() { |
64 while (!fetchers_.empty()) | 64 while (!fetchers_.empty()) |
65 (*fetchers_.begin())->CancelURLRequest(ERR_ABORTED); | 65 (*fetchers_.begin())->CancelURLRequest(ERR_ABORTED); |
66 } | 66 } |
67 | 67 |
68 // URLFetcherCore ------------------------------------------------------------- | 68 // URLFetcherCore ------------------------------------------------------------- |
69 | 69 |
70 // static | 70 // static |
71 base::LazyInstance<URLFetcherCore::Registry> | 71 base::LazyInstance<URLFetcherCore::Registry>::DestructorAtExit |
72 URLFetcherCore::g_registry = LAZY_INSTANCE_INITIALIZER; | 72 URLFetcherCore::g_registry = LAZY_INSTANCE_INITIALIZER; |
73 | 73 |
74 URLFetcherCore::URLFetcherCore(URLFetcher* fetcher, | 74 URLFetcherCore::URLFetcherCore(URLFetcher* fetcher, |
75 const GURL& original_url, | 75 const GURL& original_url, |
76 URLFetcher::RequestType request_type, | 76 URLFetcher::RequestType request_type, |
77 URLFetcherDelegate* d) | 77 URLFetcherDelegate* d) |
78 : fetcher_(fetcher), | 78 : fetcher_(fetcher), |
79 original_url_(original_url), | 79 original_url_(original_url), |
80 request_type_(request_type), | 80 request_type_(request_type), |
81 delegate_(d), | 81 delegate_(d), |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 } | 955 } |
956 | 956 |
957 void URLFetcherCore::AssertHasNoUploadData() const { | 957 void URLFetcherCore::AssertHasNoUploadData() const { |
958 DCHECK(!upload_content_set_); | 958 DCHECK(!upload_content_set_); |
959 DCHECK(upload_content_.empty()); | 959 DCHECK(upload_content_.empty()); |
960 DCHECK(upload_file_path_.empty()); | 960 DCHECK(upload_file_path_.empty()); |
961 DCHECK(upload_stream_factory_.is_null()); | 961 DCHECK(upload_stream_factory_.is_null()); |
962 } | 962 } |
963 | 963 |
964 } // namespace net | 964 } // namespace net |
OLD | NEW |