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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 default: { | 1125 default: { |
1126 NOTREACHED(); | 1126 NOTREACHED(); |
1127 break; | 1127 break; |
1128 } | 1128 } |
1129 } | 1129 } |
1130 if (do_update_pref) | 1130 if (do_update_pref) |
1131 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1131 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
1132 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) | 1132 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) |
1133 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1133 local_state->SetString(prefs::kApplicationLocale, new_locale); |
1134 | 1134 |
1135 if (user_manager::UserManager::Get()->GetOwnerEmail() == | 1135 if (user_manager::UserManager::Get()->GetOwnerAccountId() == |
1136 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) | 1136 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->GetAccountId()) |
1137 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1137 local_state->SetString(prefs::kOwnerLocale, new_locale); |
1138 } | 1138 } |
1139 | 1139 |
1140 void ProfileImpl::OnLogin() { | 1140 void ProfileImpl::OnLogin() { |
1141 if (locale_change_guard_ == NULL) | 1141 if (locale_change_guard_ == NULL) |
1142 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1142 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
1143 locale_change_guard_->OnLogin(); | 1143 locale_change_guard_->OnLogin(); |
1144 } | 1144 } |
1145 | 1145 |
1146 void ProfileImpl::InitChromeOSPreferences() { | 1146 void ProfileImpl::InitChromeOSPreferences() { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1285 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1286 domain_reliability::DomainReliabilityService* service = | 1286 domain_reliability::DomainReliabilityService* service = |
1287 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1287 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1288 GetForBrowserContext(this); | 1288 GetForBrowserContext(this); |
1289 if (!service) | 1289 if (!service) |
1290 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1290 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1291 | 1291 |
1292 return service->CreateMonitor( | 1292 return service->CreateMonitor( |
1293 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1293 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1294 } | 1294 } |
OLD | NEW |