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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 namespace net { | 45 namespace net { |
46 | 46 |
47 // URLFetcherCore::Registry --------------------------------------------------- | 47 // URLFetcherCore::Registry --------------------------------------------------- |
48 | 48 |
49 URLFetcherCore::Registry::Registry() {} | 49 URLFetcherCore::Registry::Registry() {} |
50 URLFetcherCore::Registry::~Registry() {} | 50 URLFetcherCore::Registry::~Registry() {} |
51 | 51 |
52 void URLFetcherCore::Registry::AddURLFetcherCore(URLFetcherCore* core) { | 52 void URLFetcherCore::Registry::AddURLFetcherCore(URLFetcherCore* core) { |
53 DCHECK(!ContainsKey(fetchers_, core)); | 53 DCHECK(!base::ContainsKey(fetchers_, core)); |
54 fetchers_.insert(core); | 54 fetchers_.insert(core); |
55 } | 55 } |
56 | 56 |
57 void URLFetcherCore::Registry::RemoveURLFetcherCore(URLFetcherCore* core) { | 57 void URLFetcherCore::Registry::RemoveURLFetcherCore(URLFetcherCore* core) { |
58 DCHECK(ContainsKey(fetchers_, core)); | 58 DCHECK(base::ContainsKey(fetchers_, core)); |
59 fetchers_.erase(core); | 59 fetchers_.erase(core); |
60 } | 60 } |
61 | 61 |
62 void URLFetcherCore::Registry::CancelAll() { | 62 void URLFetcherCore::Registry::CancelAll() { |
63 while (!fetchers_.empty()) | 63 while (!fetchers_.empty()) |
64 (*fetchers_.begin())->CancelURLRequest(ERR_ABORTED); | 64 (*fetchers_.begin())->CancelURLRequest(ERR_ABORTED); |
65 } | 65 } |
66 | 66 |
67 // URLFetcherCore ------------------------------------------------------------- | 67 // URLFetcherCore ------------------------------------------------------------- |
68 | 68 |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 } | 949 } |
950 | 950 |
951 void URLFetcherCore::AssertHasNoUploadData() const { | 951 void URLFetcherCore::AssertHasNoUploadData() const { |
952 DCHECK(!upload_content_set_); | 952 DCHECK(!upload_content_set_); |
953 DCHECK(upload_content_.empty()); | 953 DCHECK(upload_content_.empty()); |
954 DCHECK(upload_file_path_.empty()); | 954 DCHECK(upload_file_path_.empty()); |
955 DCHECK(upload_stream_factory_.is_null()); | 955 DCHECK(upload_stream_factory_.is_null()); |
956 } | 956 } |
957 | 957 |
958 } // namespace net | 958 } // namespace net |
OLD | NEW |