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

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

Issue 11227017: Remove the mutation functions interfaces from URLRequestJobFactory. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Android Webview interfaces; also a long awaited rebase. Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2011 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/url_request/protocol_intercept_job_factory.h" 5 #include "net/url_request/protocol_intercept_job_factory.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/url_request/url_request_job_manager.h" 10 #include "net/url_request/url_request_job_manager.h"
11 11
12 class GURL; 12 class GURL;
13 13
14 namespace net { 14 namespace net {
15 15
16 ProtocolInterceptJobFactory::ProtocolInterceptJobFactory( 16 ProtocolInterceptJobFactory::ProtocolInterceptJobFactory(
17 scoped_ptr<URLRequestJobFactory> job_factory, 17 scoped_ptr<URLRequestJobFactory> job_factory,
18 scoped_ptr<ProtocolHandler> protocol_handler) 18 scoped_ptr<ProtocolHandler> protocol_handler)
19 : job_factory_(job_factory.Pass()), 19 : job_factory_(job_factory.Pass()),
20 protocol_handler_(protocol_handler.Pass()) { 20 protocol_handler_(protocol_handler.Pass()) {
21 } 21 }
22 22
23 ProtocolInterceptJobFactory::~ProtocolInterceptJobFactory() {} 23 ProtocolInterceptJobFactory::~ProtocolInterceptJobFactory() {}
24 24
25 bool ProtocolInterceptJobFactory::SetProtocolHandler(
26 const std::string& scheme, ProtocolHandler* protocol_handler) {
27 return job_factory_->SetProtocolHandler(scheme, protocol_handler);
28 }
29
30 void ProtocolInterceptJobFactory::AddInterceptor(Interceptor* interceptor) {
31 return job_factory_->AddInterceptor(interceptor);
32 }
33
34 URLRequestJob* ProtocolInterceptJobFactory::MaybeCreateJobWithInterceptor( 25 URLRequestJob* ProtocolInterceptJobFactory::MaybeCreateJobWithInterceptor(
35 URLRequest* request, NetworkDelegate* network_delegate) const { 26 URLRequest* request, NetworkDelegate* network_delegate) const {
36 return job_factory_->MaybeCreateJobWithInterceptor(request, network_delegate); 27 return job_factory_->MaybeCreateJobWithInterceptor(request, network_delegate);
37 } 28 }
38 29
39 URLRequestJob* ProtocolInterceptJobFactory::MaybeCreateJobWithProtocolHandler( 30 URLRequestJob* ProtocolInterceptJobFactory::MaybeCreateJobWithProtocolHandler(
40 const std::string& scheme, 31 const std::string& scheme,
41 URLRequest* request, 32 URLRequest* request,
42 NetworkDelegate* network_delegate) const { 33 NetworkDelegate* network_delegate) const {
43 DCHECK(CalledOnValidThread()); 34 DCHECK(CalledOnValidThread());
(...skipping 21 matching lines...) Expand all
65 bool ProtocolInterceptJobFactory::IsHandledProtocol( 56 bool ProtocolInterceptJobFactory::IsHandledProtocol(
66 const std::string& scheme) const { 57 const std::string& scheme) const {
67 return job_factory_->IsHandledProtocol(scheme); 58 return job_factory_->IsHandledProtocol(scheme);
68 } 59 }
69 60
70 bool ProtocolInterceptJobFactory::IsHandledURL(const GURL& url) const { 61 bool ProtocolInterceptJobFactory::IsHandledURL(const GURL& url) const {
71 return job_factory_->IsHandledURL(url); 62 return job_factory_->IsHandledURL(url);
72 } 63 }
73 64
74 } // namespace net 65 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/protocol_intercept_job_factory.h ('k') | net/url_request/url_request_job_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698