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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 #include "grit/generated_resources.h" | 104 #include "grit/generated_resources.h" |
105 #include "ui/base/l10n/l10n_util.h" | 105 #include "ui/base/l10n/l10n_util.h" |
106 | 106 |
107 #if defined(OS_ANDROID) | 107 #if defined(OS_ANDROID) |
108 #include "chrome/browser/media/protected_media_identifier_permission_context.h" | 108 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
109 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" | 109 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" |
110 #endif | 110 #endif |
111 | 111 |
112 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
113 #include "chrome/browser/chromeos/locale_change_guard.h" | 113 #include "chrome/browser/chromeos/locale_change_guard.h" |
114 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
115 #include "chrome/browser/chromeos/preferences.h" | 114 #include "chrome/browser/chromeos/preferences.h" |
116 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 115 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 116 #include "components/user_manager/user_manager.h" |
117 #endif | 117 #endif |
118 | 118 |
119 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 119 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
120 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 120 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
121 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" | 121 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
122 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" | 122 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" |
123 #endif | 123 #endif |
124 | 124 |
125 #if defined(ENABLE_CONFIGURATION_POLICY) | 125 #if defined(ENABLE_CONFIGURATION_POLICY) |
126 #include "chrome/browser/policy/schema_registry_service.h" | 126 #include "chrome/browser/policy/schema_registry_service.h" |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 default: { | 1256 default: { |
1257 NOTREACHED(); | 1257 NOTREACHED(); |
1258 break; | 1258 break; |
1259 } | 1259 } |
1260 } | 1260 } |
1261 if (do_update_pref) | 1261 if (do_update_pref) |
1262 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1262 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
1263 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) | 1263 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) |
1264 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1264 local_state->SetString(prefs::kApplicationLocale, new_locale); |
1265 | 1265 |
1266 if (chromeos::UserManager::Get()->GetOwnerEmail() == | 1266 if (user_manager::UserManager::Get()->GetOwnerEmail() == |
1267 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) | 1267 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) |
1268 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1268 local_state->SetString(prefs::kOwnerLocale, new_locale); |
1269 } | 1269 } |
1270 | 1270 |
1271 void ProfileImpl::OnLogin() { | 1271 void ProfileImpl::OnLogin() { |
1272 if (locale_change_guard_ == NULL) | 1272 if (locale_change_guard_ == NULL) |
1273 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1273 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
1274 locale_change_guard_->OnLogin(); | 1274 locale_change_guard_->OnLogin(); |
1275 } | 1275 } |
1276 | 1276 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 ProfileImpl::CreateDomainReliabilityMonitor() { | 1418 ProfileImpl::CreateDomainReliabilityMonitor() { |
1419 domain_reliability::DomainReliabilityService* service = | 1419 domain_reliability::DomainReliabilityService* service = |
1420 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1420 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1421 GetForBrowserContext(this); | 1421 GetForBrowserContext(this); |
1422 if (!service) | 1422 if (!service) |
1423 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1423 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1424 | 1424 |
1425 return service->CreateMonitor( | 1425 return service->CreateMonitor( |
1426 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1426 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1427 } | 1427 } |
OLD | NEW |