diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 22:30:30 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 22:30:30 +0000 |
commit | 23f1ef1a445a53bcefc8ddab9f4184b1db7321c5 (patch) | |
tree | c9f17a33025ed5b5c5dee76a7b4fef9104e9a995 /chrome/browser/net/chrome_url_request_context.h | |
parent | e143c823ce66af5a83a9a17b6f5938eb16e49392 (diff) | |
download | chromium_src-23f1ef1a445a53bcefc8ddab9f4184b1db7321c5.zip chromium_src-23f1ef1a445a53bcefc8ddab9f4184b1db7321c5.tar.gz chromium_src-23f1ef1a445a53bcefc8ddab9f4184b1db7321c5.tar.bz2 |
Plumb request interception into the appcache library for both chrome and test_shell.
AppCache library:
* Added AppCacheInterceptor, which is derived from URLRequest::Interceptor.
Chrome:
* Each UserProfile instantiates a ChromeAppCacheService, which is derived from an appcache library class.
* Each ChromeURLRequestContext associated with that profile has a reference to that instance.
* ResourceDispatcherHost pokes AppCacheInterceptor when initiating URLRequests and when returning the response head.
TestShell:
* Added SimpleAppCacheSystem which bundles together appcache lib components for use in a single process with an UI and IO thread.
* TestShellWebKit instantiates and initializes an instance of the above, aimed at at temp directory that will get cleaned up when the test run is over.
* SimpleResourceLoaderBridge pokes the system when initiating URLRequests and when returning the response head.
TEST=none, although many existing tests exercise this stuff
BUG=none
Review URL: http://codereview.chromium.org/173406
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/chrome_url_request_context.h')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index f4baea6..d0303d7 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/file_path.h" +#include "chrome/common/appcache/chrome_appcache_service.h" #include "chrome/common/net/cookie_monster_sqlite.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/pref_service.h" @@ -65,6 +66,12 @@ class ChromeURLRequestContext : public URLRequestContext, return user_script_dir_path_; } + // Gets the appcache service to be used for requests in this context. + // May be NULL if requests for this context aren't subject to appcaching. + ChromeAppCacheService* appcache_service() const { + return appcache_service_.get(); + } + virtual const std::string& GetUserAgent(const GURL& url) const; virtual bool InterceptCookie(const URLRequest* request, std::string* cookie); @@ -118,6 +125,8 @@ class ChromeURLRequestContext : public URLRequestContext, // Path to the directory user scripts are stored in. FilePath user_script_dir_path_; + scoped_refptr<ChromeAppCacheService> appcache_service_; + scoped_ptr<SQLitePersistentCookieStore> cookie_db_; PrefService* prefs_; const Blacklist* blacklist_; |