Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: net/proxy/proxy_service_unittest.cc

Issue 6338002: net: Remove typedef net::URLRequestContext URLRequestContext; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for real Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698