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

Unified Diff: chrome/browser/intranet_redirect_detector.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/intranet_redirect_detector.cc
diff --git a/chrome/browser/intranet_redirect_detector.cc b/chrome/browser/intranet_redirect_detector.cc
index 8be4d5e2850931ae81efee01be074685795e1b6a..643b29d758855cd8f5ea7670fcb356511fdec29c 100644
--- a/chrome/browser/intranet_redirect_detector.cc
+++ b/chrome/browser/intranet_redirect_detector.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.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 "net/base/load_flags.h"
@@ -26,7 +27,8 @@ IntranetRedirectDetector::IntranetRedirectDetector()
prefs::kLastKnownIntranetRedirectOrigin)),
ALLOW_THIS_IN_INITIALIZER_LIST(fetcher_factory_(this)),
in_sleep_(true),
- request_context_available_(Profile::GetDefaultRequestContext() != NULL) {
+ request_context_available_(
+ g_browser_process->system_request_context() != NULL) {
willchan no longer on Chromium 2011/02/21 23:05:49 Do we know whether or not this works? I believe th
battre 2011/03/08 17:38:58 The IntranetRedirectDetector is instantiated by th
registrar_.Add(this, NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE,
NotificationService::AllSources());
@@ -98,7 +100,7 @@ void IntranetRedirectDetector::StartFetchesIfPossible() {
// We don't want these fetches to affect existing state in the profile.
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());
fetcher->Start();
fetchers_.insert(fetcher);
}

Powered by Google App Engine
This is Rietveld 408576698