OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 case APP_LOCALE_CHANGED_VIA_UNKNOWN: | 1136 case APP_LOCALE_CHANGED_VIA_UNKNOWN: |
1137 default: { | 1137 default: { |
1138 NOTREACHED(); | 1138 NOTREACHED(); |
1139 break; | 1139 break; |
1140 } | 1140 } |
1141 } | 1141 } |
1142 if (do_update_pref) | 1142 if (do_update_pref) |
1143 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1143 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
1144 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1144 local_state->SetString(prefs::kApplicationLocale, new_locale); |
1145 | 1145 |
1146 if (chromeos::UserManager::Get()->IsCurrentUserOwner()) | 1146 if (chromeos::UserManager::Get()->GetOwnerEmail() == |
| 1147 chromeos::UserManager::Get()->GetUserByProfile(this)->email()) |
1147 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1148 local_state->SetString(prefs::kOwnerLocale, new_locale); |
1148 } | 1149 } |
1149 | 1150 |
1150 void ProfileImpl::OnLogin() { | 1151 void ProfileImpl::OnLogin() { |
1151 if (locale_change_guard_ == NULL) | 1152 if (locale_change_guard_ == NULL) |
1152 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1153 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
1153 locale_change_guard_->OnLogin(); | 1154 locale_change_guard_->OnLogin(); |
1154 } | 1155 } |
1155 | 1156 |
1156 void ProfileImpl::InitChromeOSPreferences() { | 1157 void ProfileImpl::InitChromeOSPreferences() { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1270 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
1270 #if defined(OS_CHROMEOS) | 1271 #if defined(OS_CHROMEOS) |
1271 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1272 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
1272 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1273 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
1273 g_browser_process->local_state()); | 1274 g_browser_process->local_state()); |
1274 } | 1275 } |
1275 #endif // defined(OS_CHROMEOS) | 1276 #endif // defined(OS_CHROMEOS) |
1276 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1277 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
1277 GetPrefs(), g_browser_process->local_state()); | 1278 GetPrefs(), g_browser_process->local_state()); |
1278 } | 1279 } |
OLD | NEW |