Index: chrome/browser/chromeos/preferences.cc |
=================================================================== |
--- chrome/browser/chromeos/preferences.cc (revision 106405) |
+++ chrome/browser/chromeos/preferences.cc (working copy) |
@@ -17,7 +17,7 @@ |
#include "chrome/browser/chromeos/input_method/input_method_util.h" |
#include "chrome/browser/chromeos/input_method/xkeyboard.h" |
#include "chrome/browser/chromeos/login/login_utils.h" |
-#include "chrome/browser/chromeos/proxy_config_service_impl.h" |
+#include "chrome/browser/chromeos/login/user_manager.h" |
#include "chrome/browser/chromeos/system/touchpad_settings.h" |
#include "chrome/browser/prefs/pref_member.h" |
#include "chrome/browser/prefs/pref_service.h" |
@@ -25,8 +25,10 @@ |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
+#include "content/browser/browser_thread.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
+#include "googleurl/src/gurl.h" |
#include "unicode/timezone.h" |
namespace chromeos { |
@@ -195,9 +197,13 @@ |
true, |
PrefService::UNSYNCABLE_PREF); |
- // Use shared proxies default to off. |
+ // Use shared proxies default to off if user is logged in and true otherwise. |
+ // UseManager::Get() must be called on UI thread. |
+ bool default_use_shared_proxies = |
+ !(BrowserThread::CurrentlyOn(BrowserThread::UI) && |
Mattias Nissler (ping if slow)
2011/10/25 12:43:11
Shouldn't this at least be a DCHECK? I guess you d
|
+ UserManager::Get()->user_is_logged_in()); |
prefs->RegisterBooleanPref(prefs::kUseSharedProxies, |
- false, |
+ default_use_shared_proxies, |
PrefService::SYNCABLE_PREF); |
// OAuth1 all access token and secret pair. |
@@ -275,8 +281,6 @@ |
enable_screen_lock_.Init(prefs::kEnableScreenLock, prefs, this); |
- use_shared_proxies_.Init(prefs::kUseSharedProxies, prefs, this); |
- |
// Initialize preferences to currently saved state. |
NotifyPrefChanged(NULL); |
@@ -466,11 +470,6 @@ |
CrosLibrary::Get()->GetPowerLibrary()->EnableScreenLock( |
enable_screen_lock_.GetValue()); |
} |
- |
- if (!pref_name || *pref_name == prefs::kUseSharedProxies) { |
- g_browser_process->chromeos_proxy_config_service_impl()-> |
- UISetUseSharedProxies(use_shared_proxies_.GetValue()); |
- } |
} |
void Preferences::SetLanguageConfigBoolean(const char* section, |