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

Unified Diff: chrome/browser/extensions/autoupdate_interceptor.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: chrome/browser/extensions/autoupdate_interceptor.h
diff --git a/chrome/browser/extensions/autoupdate_interceptor.h b/chrome/browser/extensions/autoupdate_interceptor.h
index cfc0659087bcb475bcda427fea6c220ae487061e..a254348239331ad13b0c2be0016d371ba0c1a18d 100644
--- a/chrome/browser/extensions/autoupdate_interceptor.h
+++ b/chrome/browser/extensions/autoupdate_interceptor.h
@@ -10,22 +10,23 @@
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_job_factory.h"
namespace extensions {
// This url request interceptor lets us respond to localhost http request urls
// with the contents of files on disk for use in tests.
class AutoUpdateInterceptor
- : public net::URLRequest::Interceptor,
+ : public net::URLRequestJobFactory::ProtocolHandler,
public base::RefCountedThreadSafe<AutoUpdateInterceptor> {
public:
AutoUpdateInterceptor();
// When computing matches, this ignores query parameters (since the autoupdate
// fetch code appends a bunch of them to manifest fetches).
- virtual net::URLRequestJob* MaybeIntercept(
+ virtual net::URLRequestJob* MaybeCreateJob(
net::URLRequest* request,
- net::NetworkDelegate* network_delegate) OVERRIDE;
+ net::NetworkDelegate* network_delegate) const OVERRIDE;
// When requests for |url| arrive, respond with the contents of |path|. The
// hostname of |url| must be "localhost" to avoid DNS lookups, and the scheme
@@ -40,6 +41,8 @@ class AutoUpdateInterceptor
friend class base::RefCountedThreadSafe<AutoUpdateInterceptor>;
virtual ~AutoUpdateInterceptor();
+ void Register();
+ static void Unregister();
std::map<GURL, FilePath> responses_;

Powered by Google App Engine
This is Rietveld 408576698