| 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_;
|
|
|
|
|