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

Unified Diff: chrome/browser/google/google_url_tracker.cc

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 10 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
Index: chrome/browser/google/google_url_tracker.cc
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index 5c0e05dafca6e018ec4ab3baa6478e7a96bdcde1..be1a48227c64555a4e5e10a75df25c4d3701b210 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -12,11 +12,11 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
@@ -98,7 +98,7 @@ GoogleURLTracker::GoogleURLTracker()
in_startup_sleep_(true),
already_fetched_(false),
need_to_fetch_(false),
- request_context_available_(!!Profile::GetDefaultRequestContext()),
+ request_context_available_(!!g_browser_process->system_request_context()),
need_to_prompt_(false),
controller_(NULL),
infobar_(NULL) {
@@ -193,12 +193,12 @@ void GoogleURLTracker::StartFetchIfDesirable() {
fetcher_.reset(URLFetcher::Create(fetcher_id_, GURL(kSearchDomainCheckURL),
URLFetcher::GET, this));
++fetcher_id_;
- // We don't want this fetch to affect existing state in the profile. For
+ // We don't want this fetch to affect existing state in local_state. For
// example, if a user has no Google cookies, this automatic check should not
// cause one to be set, lest we alarm the user.
fetcher_->set_load_flags(net::LOAD_DISABLE_CACHE |
net::LOAD_DO_NOT_SAVE_COOKIES);
- fetcher_->set_request_context(Profile::GetDefaultRequestContext());
+ fetcher_->set_request_context(g_browser_process->system_request_context());
// Configure to max_retries at most kMaxRetries times for 5xx errors.
static const int kMaxRetries = 5;

Powered by Google App Engine
This is Rietveld 408576698