| 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..961794f5f27e262896d2776765a5d42f13c14915 100644
|
| --- a/chrome/browser/extensions/autoupdate_interceptor.h
|
| +++ b/chrome/browser/extensions/autoupdate_interceptor.h
|
| @@ -5,27 +5,20 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_AUTOUPDATE_INTERCEPTOR_H_
|
| #define CHROME_BROWSER_EXTENSIONS_AUTOUPDATE_INTERCEPTOR_H_
|
|
|
| -#include <map>
|
| #include <string>
|
|
|
| -#include "googleurl/src/gurl.h"
|
| -#include "net/url_request/url_request.h"
|
| +#include "base/basictypes.h"
|
| +
|
| +class FilePath;
|
|
|
| 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 base::RefCountedThreadSafe<AutoUpdateInterceptor> {
|
| +class 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(
|
| - net::URLRequest* request,
|
| - net::NetworkDelegate* network_delegate) OVERRIDE;
|
| + virtual ~AutoUpdateInterceptor();
|
|
|
| // 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
|
| @@ -33,15 +26,10 @@ class AutoUpdateInterceptor
|
| // Also, the match for |url| will ignore any query parameters.
|
| void SetResponse(const std::string url, const FilePath& path);
|
|
|
| - // A helper function to call SetResponse on the I/O thread.
|
| - void SetResponseOnIOThread(const std::string url, const FilePath& path);
|
| -
|
| private:
|
| - friend class base::RefCountedThreadSafe<AutoUpdateInterceptor>;
|
| -
|
| - virtual ~AutoUpdateInterceptor();
|
| + class Delegate;
|
|
|
| - std::map<GURL, FilePath> responses_;
|
| + Delegate* delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AutoUpdateInterceptor);
|
| };
|
|
|