summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/chrome_url_request_context.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 14:34:50 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 14:34:50 +0000
commit92a4769c7cff24906ffa52fb3ee5e37753889a96 (patch)
treebb3ebe27a853bb3fdca8ab1e391298f89ba4d155 /chrome/browser/net/chrome_url_request_context.h
parent27861447e9b9f359cf893065ef07186589791333 (diff)
downloadchromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.zip
chromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.tar.gz
chromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.tar.bz2
Remove more unnecessary ChromeURLRequestContext members.
ProfileIOData is now always deleted on the IO thread. Replaces a use of ChromeURLRequestContextGetter with a ChromeURLDataManagerBackend getter callback. Also gets rid of ExtensionInfoMap from ChromeURLRequestContext by directly passing it into the places that need it. Gets rid of the HTML5 storage objects from ChromeURLRequestContext too. Adds a workaround for TranslateManager's Profile::GetDefaultRequestContext() use, since after this refactoring (by not requiring ChromeURLRequestContextGetter for ChromeURLDataManagerBackend), it prevents having to initialize the ChromeURLRequestContextGetter in most tests since they don't actually use it. This means |default_request_context_| doesn't always get initialized in BrowserMain(), which causes TranslateManager to crash on startup since it requires |default_request_context_| to be initialized. So we forcibly initialize |default_request_context_| until TranslateManager stops depending on this. BUG=89396 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92668 Review URL: http://codereview.chromium.org/7282054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92690 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.h51
1 files changed, 2 insertions, 49 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index dd716f6..22db34c 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -9,25 +9,16 @@
#include <string>
#include <vector>
-#include "base/file_path.h"
-#include "base/memory/weak_ptr.h"
-#include "chrome/browser/extensions/extension_info_map.h"
-#include "chrome/browser/extensions/extension_webrequest_api.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/common/extensions/extension_icon_set.h"
-#include "content/browser/appcache/chrome_appcache_service.h"
-#include "content/browser/chrome_blob_storage_context.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
-#include "webkit/fileapi/file_system_context.h"
class ChromeURLDataManagerBackend;
class ChromeURLRequestContextFactory;
class IOThread;
-class PrefService;
class Profile;
class ProfileIOData;
namespace base {
@@ -53,32 +44,12 @@ class ChromeURLRequestContext : public net::URLRequestContext {
return weak_ptr_factory_.GetWeakPtr();
}
- // 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();
- }
-
- // Gets the blob storage context associated with this context's profile.
- ChromeBlobStorageContext* blob_storage_context() const {
- return blob_storage_context_.get();
- }
-
- // Gets the file system host context with this context's profile.
- fileapi::FileSystemContext* file_system_context() const {
- return file_system_context_.get();
- }
-
bool is_incognito() const {
return is_incognito_;
}
virtual const std::string& GetUserAgent(const GURL& url) const;
- const ExtensionInfoMap* extension_info_map() const {
- return extension_info_map_;
- }
-
// TODO(willchan): Get rid of the need for this accessor. Really, this should
// move completely to ProfileIOData.
ChromeURLDataManagerBackend* chrome_url_data_manager_backend() const;
@@ -86,18 +57,7 @@ class ChromeURLRequestContext : public net::URLRequestContext {
void set_is_incognito(bool is_incognito) {
is_incognito_ = is_incognito;
}
- void set_appcache_service(ChromeAppCacheService* service) {
- appcache_service_ = service;
- }
- void set_blob_storage_context(ChromeBlobStorageContext* context) {
- blob_storage_context_ = context;
- }
- void set_file_system_context(fileapi::FileSystemContext* context) {
- file_system_context_ = context;
- }
- void set_extension_info_map(ExtensionInfoMap* map) {
- extension_info_map_ = map;
- }
+
void set_chrome_url_data_manager_backend(
ChromeURLDataManagerBackend* backend);
@@ -118,13 +78,6 @@ class ChromeURLRequestContext : public net::URLRequestContext {
// be added to CopyFrom.
// ---------------------------------------------------------------------------
- // TODO(willchan): Make these non-refcounted.
- scoped_refptr<ChromeAppCacheService> appcache_service_;
- scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
- scoped_refptr<fileapi::FileSystemContext> file_system_context_;
- // TODO(aa): This should use chrome/common/extensions/extension_set.h.
- scoped_refptr<ExtensionInfoMap> extension_info_map_;
-
ChromeURLDataManagerBackend* chrome_url_data_manager_backend_;
bool is_incognito_;