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

Unified Diff: net/url_request/url_request_filter.h

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_filter.h
diff --git a/net/url_request/url_request_filter.h b/net/url_request/url_request_filter.h
index c039300cef41cc025831283d89a850d9dda858b0..1286cf25a5b15d145cff0cb84a23c95f3d0eb7dd 100644
--- a/net/url_request/url_request_filter.h
+++ b/net/url_request/url_request_filter.h
@@ -25,6 +25,7 @@
#include "base/hash_tables.h"
#include "net/base/net_export.h"
#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_job_factory.h"
class GURL;
@@ -35,7 +36,7 @@ class NET_EXPORT URLRequestFilter {
public:
// scheme,hostname -> ProtocolFactory
typedef std::map<std::pair<std::string, std::string>,
- URLRequest::ProtocolFactory*> HostnameHandlerMap;
+ base::Callback<URLRequest::ProtocolFactory> > HostnameHandlerMap;
erikwright (departed) 2012/11/27 05:54:05 include callback.h
pauljensen 2012/11/30 21:02:34 Done.
typedef base::hash_map<std::string, URLRequest::ProtocolFactory*>
UrlHandlerMap;
@@ -49,6 +50,10 @@ class NET_EXPORT URLRequestFilter {
void AddHostnameHandler(const std::string& scheme,
const std::string& hostname,
URLRequest::ProtocolFactory* factory);
+ void AddHostnameProtocolHandler(
+ const std::string& scheme,
+ const std::string& hostname,
+ URLRequestJobFactory::ProtocolHandler* protocol_handler);
void RemoveHostnameHandler(const std::string& scheme,
const std::string& hostname);
@@ -83,6 +88,11 @@ class NET_EXPORT URLRequestFilter {
int hit_count_;
private:
+ void AddHostnameCallback(
+ const std::string& scheme,
+ const std::string& hostname,
+ base::Callback<URLRequest::ProtocolFactory> callback);
+
// Singleton instance.
static URLRequestFilter* shared_instance_;

Powered by Google App Engine
This is Rietveld 408576698