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

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

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years 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_unittest.cc » ('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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 } 537 }
538 538
539 // static 539 // static
540 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 540 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
541 return value_; 541 return value_;
542 } 542 }
543 543
544 TestJobInterceptor::TestJobInterceptor() : main_intercept_job_(NULL) { 544 TestJobInterceptor::TestJobInterceptor() : main_intercept_job_(NULL) {
545 } 545 }
546 546
547 URLRequestJob* TestJobInterceptor::MaybeIntercept( 547 URLRequestJob* TestJobInterceptor::MaybeCreateJob(
548 URLRequest* request, 548 URLRequest* request,
549 NetworkDelegate* network_delegate) const { 549 NetworkDelegate* network_delegate) const {
550 URLRequestJob* job = main_intercept_job_; 550 URLRequestJob* job = main_intercept_job_;
551 main_intercept_job_ = NULL; 551 main_intercept_job_ = NULL;
552 return job; 552 return job;
553 } 553 }
554 554
555 URLRequestJob* TestJobInterceptor::MaybeInterceptRedirect(
556 const GURL& location,
557 URLRequest* request,
558 NetworkDelegate* network_delegate) const {
559 return NULL;
560 }
561
562 URLRequestJob* TestJobInterceptor::MaybeInterceptResponse(
563 URLRequest* request,
564 NetworkDelegate* network_delegate) const {
565 return NULL;
566 }
567
568 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { 555 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) {
569 main_intercept_job_ = job; 556 main_intercept_job_ = job;
570 } 557 }
571 558
572 } // namespace net 559 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698