Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: chrome/browser/web_resource/web_resource_service.cc

Issue 7099004: Use the System URL Request Context in the web resource service instead of the default profile's c... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/web_resource_service.cc
===================================================================
--- chrome/browser/web_resource/web_resource_service.cc (revision 88135)
+++ chrome/browser/web_resource/web_resource_service.cc (working copy)
@@ -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 @@
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 @@
};
WebResourceService::WebResourceService(
- Profile* profile,
PrefService* prefs,
const char* web_resource_server,
bool apply_locale_to_url,
@@ -206,7 +203,6 @@
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 @@
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);
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698