diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 21:07:34 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 21:07:34 +0000 |
commit | f75541ef8ad44969c423674914241be4a3dee887 (patch) | |
tree | 6533fa7ae54442d51ea4dd54af854966fca83fd0 /chrome/browser/web_resource/web_resource_service.cc | |
parent | aa27b95336f42a96f5af6fc56469af23f005bfea (diff) | |
download | chromium_src-f75541ef8ad44969c423674914241be4a3dee887.zip chromium_src-f75541ef8ad44969c423674914241be4a3dee887.tar.gz chromium_src-f75541ef8ad44969c423674914241be4a3dee887.tar.bz2 |
Use the System URL Request Context in the web resource service instead of the default profile's context.
This change should be made because there will be no more default profile, because these services should be able to run without being attached to a specific profile, and because they should only ever fetch json data from controlled URLs.
BUG=64339
TEST=all current web resource tests continue to work.
Review URL: http://codereview.chromium.org/7099004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_resource/web_resource_service.cc')
-rw-r--r-- | chrome/browser/web_resource/web_resource_service.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index a60e013..5c116cd0 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -14,7 +14,6 @@ #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/prefs/pref_service.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/sync_ui_util.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" @@ -67,12 +66,11 @@ class WebResourceService::WebResourceFetcher url_fetcher_.reset(new URLFetcher(GURL( web_resource_server), URLFetcher::GET, this)); - // Do not let url fetcher affect existing state in profile (by setting - // cookies, for example. + // Use system request context and do not save state in cookies or cache. url_fetcher_->set_load_flags(net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SAVE_COOKIES); net::URLRequestContextGetter* url_request_context_getter = - web_resource_service_->profile_->GetRequestContext(); + g_browser_process->system_request_context(); url_fetcher_->set_request_context(url_request_context_getter); url_fetcher_->Start(); } @@ -197,7 +195,6 @@ class WebResourceService::UnpackerClient }; WebResourceService::WebResourceService( - Profile* profile, PrefService* prefs, const char* web_resource_server, bool apply_locale_to_url, @@ -206,7 +203,6 @@ WebResourceService::WebResourceService( int start_fetch_delay, int cache_update_delay) : prefs_(prefs), - profile_(profile), ALLOW_THIS_IN_INITIALIZER_LIST(service_factory_(this)), in_fetch_(false), web_resource_server_(web_resource_server), @@ -217,7 +213,6 @@ WebResourceService::WebResourceService( cache_update_delay_(cache_update_delay), web_resource_update_scheduled_(false) { DCHECK(prefs); - DCHECK(profile); prefs_->RegisterStringPref(last_update_time_pref_name, "0", PrefService::UNSYNCABLE_PREF); |