OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/proxy/proxy_service.h" | 5 #include "net/proxy/proxy_service.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 void NotifyFetchCompletion(int result, const std::string& ascii_text) { | 91 void NotifyFetchCompletion(int result, const std::string& ascii_text) { |
92 DCHECK(has_pending_request()); | 92 DCHECK(has_pending_request()); |
93 *pending_request_text_ = ASCIIToUTF16(ascii_text); | 93 *pending_request_text_ = ASCIIToUTF16(ascii_text); |
94 CompletionCallback* callback = pending_request_callback_; | 94 CompletionCallback* callback = pending_request_callback_; |
95 pending_request_callback_ = NULL; | 95 pending_request_callback_ = NULL; |
96 callback->Run(result); | 96 callback->Run(result); |
97 } | 97 } |
98 | 98 |
99 virtual void Cancel() {} | 99 virtual void Cancel() {} |
100 | 100 |
101 virtual URLRequestContext* GetRequestContext() { return NULL; } | 101 virtual net::URLRequestContext* GetRequestContext() { return NULL; } |
wtc
2011/01/15 17:54:23
Undo this change (already in the 'net' namespace).
| |
102 | 102 |
103 const GURL& pending_request_url() const { | 103 const GURL& pending_request_url() const { |
104 return pending_request_url_; | 104 return pending_request_url_; |
105 } | 105 } |
106 | 106 |
107 bool has_pending_request() const { | 107 bool has_pending_request() const { |
108 return pending_request_callback_ != NULL; | 108 return pending_request_callback_ != NULL; |
109 } | 109 } |
110 | 110 |
111 private: | 111 private: |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1694 log.GetEntries(&entries); | 1694 log.GetEntries(&entries); |
1695 | 1695 |
1696 EXPECT_TRUE(LogContainsEntryWithType(entries, 0, | 1696 EXPECT_TRUE(LogContainsEntryWithType(entries, 0, |
1697 NetLog::TYPE_PROXY_CONFIG_CHANGED)); | 1697 NetLog::TYPE_PROXY_CONFIG_CHANGED)); |
1698 ASSERT_EQ(13u, entries.size()); | 1698 ASSERT_EQ(13u, entries.size()); |
1699 for (size_t i = 1; i < entries.size(); ++i) | 1699 for (size_t i = 1; i < entries.size(); ++i) |
1700 EXPECT_NE(NetLog::TYPE_PROXY_CONFIG_CHANGED, entries[i].type); | 1700 EXPECT_NE(NetLog::TYPE_PROXY_CONFIG_CHANGED, entries[i].type); |
1701 } | 1701 } |
1702 | 1702 |
1703 } // namespace net | 1703 } // namespace net |
OLD | NEW |