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

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: sync Created 8 years 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
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..060820e8b2f61477882dd75eb52953385a3ab955 100644
--- a/net/url_request/url_request_filter.h
+++ b/net/url_request/url_request_filter.h
@@ -22,9 +22,11 @@
#include <map>
#include <string>
+#include "base/callback.h"
#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 +37,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;
typedef base::hash_map<std::string, URLRequest::ProtocolFactory*>
UrlHandlerMap;
@@ -49,6 +51,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 +89,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_;
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698