diff options
author | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 02:34:56 +0000 |
---|---|---|
committer | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 02:34:56 +0000 |
commit | b1d5ed5435546c24fa38bfea8c4baf4f18a1bbb8 (patch) | |
tree | 7b02fc3c9967aa90ff0c38edacae536791fd9553 | |
parent | 583edfcdcf3ea74f98d8bf0d2cedfbb95486ed70 (diff) | |
download | chromium_src-b1d5ed5435546c24fa38bfea8c4baf4f18a1bbb8.zip chromium_src-b1d5ed5435546c24fa38bfea8c4baf4f18a1bbb8.tar.gz chromium_src-b1d5ed5435546c24fa38bfea8c4baf4f18a1bbb8.tar.bz2 |
Removing GetDefaultProfile from chrome/browser/net
BUG=322682
TEST=functionality is the same and it should be covered by existing tests
Review URL: https://codereview.chromium.org/105893008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241452 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/net/chrome_network_delegate.cc | 6 | ||||
-rw-r--r-- | chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index e46601d..05bcf77 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -238,9 +238,11 @@ void UpdateContentLengthPrefs( return; } #if defined(OS_ANDROID) + // If Android ever goes multi profile, the profile should be passed so that + // the browser preference will be taken. bool with_data_reduction_proxy_enabled = - g_browser_process->profile_manager()->GetDefaultProfile()-> - GetPrefs()->GetBoolean(prefs::kSpdyProxyAuthEnabled); + ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean( + prefs::kSpdyProxyAuthEnabled); #else bool with_data_reduction_proxy_enabled = false; #endif diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc index b346a65..c2067f8 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings.cc @@ -666,8 +666,9 @@ net::URLFetcher* DataReductionProxySettings::GetURLFetcher() { net::URLFetcher::GET, this); fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | net::LOAD_BYPASS_PROXY); - Profile* profile = g_browser_process->profile_manager()-> - GetDefaultProfile(); + // If this code ever goes multi profile, the used profile needs to be taken + // from the browser context. + Profile* profile = ProfileManager::GetActiveUserProfile(); fetcher->SetRequestContext(profile->GetRequestContext()); // Configure max retries to be at most kMaxRetries times for 5xx errors. static const int kMaxRetries = 5; |