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

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

Issue 42013: Slight code change to make some global variables const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "googleurl/src/gurl.h" 6 #include "googleurl/src/gurl.h"
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/proxy/proxy_config_service.h" 8 #include "net/proxy/proxy_config_service.h"
9 #include "net/proxy/proxy_resolver.h" 9 #include "net/proxy/proxy_resolver.h"
10 #include "net/proxy/proxy_script_fetcher.h" 10 #include "net/proxy/proxy_script_fetcher.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bool HasPendingRequest() const { 336 bool HasPendingRequest() const {
337 return pending_request_loop_ != NULL; 337 return pending_request_loop_ != NULL;
338 } 338 }
339 339
340 MessageLoop* pending_request_loop_; 340 MessageLoop* pending_request_loop_;
341 GURL pending_request_url_; 341 GURL pending_request_url_;
342 net::CompletionCallback* pending_request_callback_; 342 net::CompletionCallback* pending_request_callback_;
343 std::string* pending_request_bytes_; 343 std::string* pending_request_bytes_;
344 }; 344 };
345 345
346 // Template specialization so MockProxyScriptFetcher does not have to be refcoun ted. 346 // Template specialization so MockProxyScriptFetcher does not have to be
347 // refcounted.
347 template<> 348 template<>
348 void RunnableMethodTraits<MockProxyScriptFetcher>::RetainCallee( 349 void RunnableMethodTraits<MockProxyScriptFetcher>::RetainCallee(
349 MockProxyScriptFetcher* remover) {} 350 MockProxyScriptFetcher* remover) {}
350 template<> 351 template<>
351 void RunnableMethodTraits<MockProxyScriptFetcher>::ReleaseCallee( 352 void RunnableMethodTraits<MockProxyScriptFetcher>::ReleaseCallee(
352 MockProxyScriptFetcher* remover) {} 353 MockProxyScriptFetcher* remover) {}
353 354
354 TEST(ProxyServiceTest, Direct) { 355 TEST(ProxyServiceTest, Direct) {
355 SyncProxyService service(new MockProxyConfigService, 356 SyncProxyService service(new MockProxyConfigService,
356 new MockProxyResolver); 357 new MockProxyResolver);
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 917
917 EXPECT_FALSE(result1->IsCompleted()); // Cancelled. 918 EXPECT_FALSE(result1->IsCompleted()); // Cancelled.
918 EXPECT_FALSE(result2->IsCompleted()); // Cancelled. 919 EXPECT_FALSE(result2->IsCompleted()); // Cancelled.
919 920
920 EXPECT_TRUE(result3->IsCompleted()); 921 EXPECT_TRUE(result3->IsCompleted());
921 EXPECT_EQ(net::OK, result3->GetResultCode()); 922 EXPECT_EQ(net::OK, result3->GetResultCode());
922 EXPECT_EQ("pac-v1.request3:80", 923 EXPECT_EQ("pac-v1.request3:80",
923 result3->GetProxyInfo().proxy_server().ToURI()); 924 result3->GetProxyInfo().proxy_server().ToURI());
924 } 925 }
925 926
OLDNEW
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698