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

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

Issue 7397008: Deprecate RegisterProtocolFactory/(Un)RegisterInterceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CF tests Created 9 years, 5 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) 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/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 base::Lock g_next_url_request_identifier_lock; 55 base::Lock g_next_url_request_identifier_lock;
56 56
57 // Returns an prior unused identifier for URL requests. 57 // Returns an prior unused identifier for URL requests.
58 uint64 GenerateURLRequestIdentifier() { 58 uint64 GenerateURLRequestIdentifier() {
59 base::AutoLock lock(g_next_url_request_identifier_lock); 59 base::AutoLock lock(g_next_url_request_identifier_lock);
60 return g_next_url_request_identifier++; 60 return g_next_url_request_identifier++;
61 } 61 }
62 62
63 } // namespace 63 } // namespace
64 64
65 URLRequest::ProtocolFactory*
66 URLRequest::Deprecated::RegisterProtocolFactory(const std::string& scheme,
67 ProtocolFactory* factory) {
68 return URLRequest::RegisterProtocolFactory(scheme, factory);
69 }
70
71 void URLRequest::Deprecated::RegisterRequestInterceptor(
72 Interceptor* interceptor) {
73 URLRequest::RegisterRequestInterceptor(interceptor);
74 }
75
76 void URLRequest::Deprecated::UnregisterRequestInterceptor(
77 Interceptor* interceptor) {
78 URLRequest::UnregisterRequestInterceptor(interceptor);
79 }
80
65 /////////////////////////////////////////////////////////////////////////////// 81 ///////////////////////////////////////////////////////////////////////////////
66 // URLRequest::Interceptor 82 // URLRequest::Interceptor
67 83
68 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect( 84 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect(
69 URLRequest* request, 85 URLRequest* request,
70 const GURL& location) { 86 const GURL& location) {
71 return NULL; 87 return NULL;
72 } 88 }
73 89
74 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( 90 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse(
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // not be needed. 796 // not be needed.
781 if (has_notified_completion_) 797 if (has_notified_completion_)
782 return; 798 return;
783 799
784 has_notified_completion_ = true; 800 has_notified_completion_ = true;
785 if (context_ && context_->network_delegate()) 801 if (context_ && context_->network_delegate())
786 context_->network_delegate()->NotifyCompleted(this); 802 context_->network_delegate()->NotifyCompleted(this);
787 } 803 }
788 804
789 } // namespace net 805 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698