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

Unified Diff: net/url_request/http_protocol_handler.h

Issue 10702137: Replaced static URLRequestHTTPJob factory with non-static protocol handler for HTTP jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/http_protocol_handler.h
diff --git a/net/url_request/http_protocol_handler.h b/net/url_request/http_protocol_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b13353244549becac3f80ea2c40b762950306b9
--- /dev/null
+++ b/net/url_request/http_protocol_handler.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2012 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_HTTP_PROTOCOL_HANDLER_H_
+#define NET_URL_REQUEST_HTTP_PROTOCOL_HANDLER_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "net/url_request/url_request_job_factory.h"
+
+namespace net {
+
+class CookieStore;
+class FraudulentCertificateReporter;
+class HttpTransactionFactory;
+class NetworkDelegate;
+class SSLConfigService;
+class TransportSecurityState;
+class URLRequestJob;
+class URLRequestThrottlerManager;
+
+// Implements a ProtocolHandler for HTTP.
+class NET_EXPORT HttpProtocolHandler :
+ public URLRequestJobFactory::ProtocolHandler {
+ public:
+ HttpProtocolHandler(
+ HttpTransactionFactory* http_transaction_factory,
+ NetworkDelegate* network_delegate,
+ URLRequestThrottlerManager* throttler_manager,
+ const std::string& accept_language,
+ const std::string& accept_charset,
+ CookieStore* cookie_store,
+ FraudulentCertificateReporter* fraudulent_certificate_reporter,
+ SSLConfigService* ssl_config_service,
+ TransportSecurityState* transport_security_state);
+
+ virtual URLRequestJob* MaybeCreateJob(URLRequest* request) const OVERRIDE;
+
+ private:
+ HttpTransactionFactory* http_transaction_factory_;
+ NetworkDelegate* network_delegate_;
+ URLRequestThrottlerManager* throttler_manager_;
+ const std::string accept_language_;
+ const std::string accept_charset_;
+ CookieStore* cookie_store_;
+ FraudulentCertificateReporter* fraudulent_certificate_reporter_;
+ SSLConfigService* ssl_config_service_;
+ TransportSecurityState* transport_security_state_;
+
+ DISALLOW_COPY_AND_ASSIGN(HttpProtocolHandler);
+};
+
+} // namespace net
+
+#endif // NET_URL_REQUEST_HTTP_PROTOCOL_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698