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

Unified Diff: net/url_request/url_request_job_factory_impl.cc

Issue 11227017: Remove the mutation functions interfaces from URLRequestJobFactory. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove OVERRIDE declaration on interfaces. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_job_factory_impl.cc
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
index aaeed79132b443ead616f4b3e0d360f6de03c328..c9b52671ba3400fabd4254c1b114b8bc87b6a4c8 100644
--- a/net/url_request/url_request_job_factory_impl.cc
+++ b/net/url_request/url_request_job_factory_impl.cc
@@ -18,34 +18,6 @@ URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {
STLDeleteElements(&interceptors_);
}
-bool URLRequestJobFactoryImpl::SetProtocolHandler(
- const std::string& scheme,
- ProtocolHandler* protocol_handler) {
- DCHECK(CalledOnValidThread());
-
- if (!protocol_handler) {
- ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme);
- if (it == protocol_handler_map_.end())
- return false;
-
- delete it->second;
- protocol_handler_map_.erase(it);
- return true;
- }
-
- if (ContainsKey(protocol_handler_map_, scheme))
- return false;
- protocol_handler_map_[scheme] = protocol_handler;
- return true;
-}
-
-void URLRequestJobFactoryImpl::AddInterceptor(Interceptor* interceptor) {
- DCHECK(CalledOnValidThread());
- CHECK(interceptor);
-
- interceptors_.push_back(interceptor);
-}
-
URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithInterceptor(
URLRequest* request, NetworkDelegate* network_delegate) const {
DCHECK(CalledOnValidThread());
@@ -127,4 +99,32 @@ bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const {
return IsHandledProtocol(url.scheme());
}
+bool URLRequestJobFactoryImpl::SetProtocolHandler(
+ const std::string& scheme,
+ ProtocolHandler* protocol_handler) {
+ DCHECK(CalledOnValidThread());
+
+ if (!protocol_handler) {
+ ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme);
+ if (it == protocol_handler_map_.end())
+ return false;
+
+ delete it->second;
+ protocol_handler_map_.erase(it);
+ return true;
+ }
+
+ if (ContainsKey(protocol_handler_map_, scheme))
+ return false;
+ protocol_handler_map_[scheme] = protocol_handler;
+ return true;
+}
+
+void URLRequestJobFactoryImpl::AddInterceptor(Interceptor* interceptor) {
+ DCHECK(CalledOnValidThread());
+ CHECK(interceptor);
+
+ interceptors_.push_back(interceptor);
+}
+
} // namespace net
« net/url_request/url_request_job_factory.h ('K') | « net/url_request/url_request_job_factory_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698