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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 case APP_LOCALE_CHANGED_VIA_UNKNOWN: | 1161 case APP_LOCALE_CHANGED_VIA_UNKNOWN: |
1162 default: { | 1162 default: { |
1163 NOTREACHED(); | 1163 NOTREACHED(); |
1164 break; | 1164 break; |
1165 } | 1165 } |
1166 } | 1166 } |
1167 if (do_update_pref) | 1167 if (do_update_pref) |
1168 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1168 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
1169 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1169 local_state->SetString(prefs::kApplicationLocale, new_locale); |
1170 | 1170 |
1171 if (chromeos::UserManager::Get()->GetOwnerEmail() == | 1171 if (chromeos::GetUserManager()->GetOwnerEmail() == |
1172 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) | 1172 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) |
1173 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1173 local_state->SetString(prefs::kOwnerLocale, new_locale); |
1174 } | 1174 } |
1175 | 1175 |
1176 void ProfileImpl::OnLogin() { | 1176 void ProfileImpl::OnLogin() { |
1177 if (locale_change_guard_ == NULL) | 1177 if (locale_change_guard_ == NULL) |
1178 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1178 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
1179 locale_change_guard_->OnLogin(); | 1179 locale_change_guard_->OnLogin(); |
1180 } | 1180 } |
1181 | 1181 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 ProfileImpl::CreateDomainReliabilityMonitor() { | 1323 ProfileImpl::CreateDomainReliabilityMonitor() { |
1324 domain_reliability::DomainReliabilityService* service = | 1324 domain_reliability::DomainReliabilityService* service = |
1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1326 GetForBrowserContext(this); | 1326 GetForBrowserContext(this); |
1327 if (!service) | 1327 if (!service) |
1328 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1328 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1329 | 1329 |
1330 return service->CreateMonitor( | 1330 return service->CreateMonitor( |
1331 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1331 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1332 } | 1332 } |
OLD | NEW |