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

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

Issue 7108035: Revert 88400 (Probable breaker of XP Tests(dbg)(5), 10.6 Tests (dbg)(2), 10.5 Tests (dbg)(2)) (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 88476)
+++ chrome/browser/web_resource/web_resource_service.cc (working copy)
@@ -14,6 +14,7 @@
#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"
@@ -66,11 +67,12 @@
url_fetcher_.reset(new URLFetcher(GURL(
web_resource_server),
URLFetcher::GET, this));
- // Use system request context and do not save state in cookies or cache.
+ // Do not let url fetcher affect existing state in profile (by setting
+ // cookies, for example.
url_fetcher_->set_load_flags(net::LOAD_DISABLE_CACHE |
net::LOAD_DO_NOT_SAVE_COOKIES);
net::URLRequestContextGetter* url_request_context_getter =
- g_browser_process->system_request_context();
+ web_resource_service_->profile_->GetRequestContext();
url_fetcher_->set_request_context(url_request_context_getter);
url_fetcher_->Start();
}
@@ -195,6 +197,7 @@
};
WebResourceService::WebResourceService(
+ Profile* profile,
PrefService* prefs,
const char* web_resource_server,
bool apply_locale_to_url,
@@ -203,6 +206,7 @@
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),
@@ -213,6 +217,7 @@
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