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

Unified Diff: net/url_request/url_request_job_factory_impl.h

Issue 10836248: Turned job_factory into a pure virtual class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 4 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.h
diff --git a/net/url_request/url_request_job_factory_impl.h b/net/url_request/url_request_job_factory_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ecfacc39c9318d5b6ad0a1b2b09773289fb4ecb
--- /dev/null
+++ b/net/url_request/url_request_job_factory_impl.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_
+#define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_
+
+#include <map>
+#include <vector>
+#include "base/basictypes.h"
+#include "net/base/net_export.h"
+#include "net/url_request/url_request_job_factory.h"
+
+namespace net {
+
+class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory {
+ public:
+ URLRequestJobFactoryImpl();
+ virtual ~URLRequestJobFactoryImpl();
+
+ // URLRequestJobFactory implementation
+
erikwright (departed) 2012/08/22 20:57:35 nit: remove vertical whitespace.
shalev 2012/08/23 15:15:46 Done.
+ virtual bool SetProtocolHandler(const std::string& scheme,
+ ProtocolHandler* protocol_handler) OVERRIDE;
+
+ virtual void AddInterceptor(Interceptor* interceptor);
+
+ virtual URLRequestJob* MaybeCreateJobWithInterceptor(
+ URLRequest* request) const OVERRIDE;
+
+ virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ const std::string& scheme, URLRequest* request) const OVERRIDE;
+
+ virtual URLRequestJob* MaybeInterceptRedirect(
+ const GURL& location, URLRequest* request) const OVERRIDE;
+
+ virtual URLRequestJob* MaybeInterceptResponse(
+ URLRequest* request) const OVERRIDE;
+
+ virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE;
+
+ virtual bool IsHandledURL(const GURL& url) const OVERRIDE;
+
+ private:
+ typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap;
+ typedef std::vector<Interceptor*> InterceptorList;
+
+ ProtocolHandlerMap protocol_handler_map_;
+ InterceptorList interceptors_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactoryImpl);
+};
+
+} // namespace net
+
+#endif // NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698