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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 152143009: Clarify settings UI in multi-profiles mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase... Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698