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

Side by Side Diff: net/url_request/url_request_test_util.cc

Issue 10440119: Introduce a delegate to avoid hardcoding "chrome-extension" in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review nit and merge to LKGR for commit. Created 8 years, 6 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/url_request/url_request_test_util.h ('k') | net/url_request/url_request_throttler_entry.h » ('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) 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_request_test_util.h" 5 #include "net/url_request/url_request_test_util.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 487
488 return allow; 488 return allow;
489 } 489 }
490 490
491 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 491 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
492 const FilePath& path) const { 492 const FilePath& path) const {
493 return true; 493 return true;
494 } 494 }
495 495
496 bool TestNetworkDelegate::OnCanThrottleRequest(
497 const net::URLRequest& request) const {
498 return true;
499 }
500
496 // static 501 // static
497 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); 502 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1");
498 503
499 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost( 504 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost(
500 const std::string& new_value) 505 const std::string& new_value)
501 : old_value_(value_), 506 : old_value_(value_),
502 new_value_(new_value) { 507 new_value_(new_value) {
503 value_ = new_value_; 508 value_ = new_value_;
504 } 509 }
505 510
506 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { 511 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
507 DCHECK_EQ(value_, new_value_); 512 DCHECK_EQ(value_, new_value_);
508 value_ = old_value_; 513 value_ = old_value_;
509 } 514 }
510 515
511 // static 516 // static
512 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 517 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
513 return value_; 518 return value_;
514 } 519 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_throttler_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698