| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 #include "grit/generated_resources.h" | 102 #include "grit/generated_resources.h" |
| 103 #include "ui/base/l10n/l10n_util.h" | 103 #include "ui/base/l10n/l10n_util.h" |
| 104 | 104 |
| 105 #if defined(OS_ANDROID) | 105 #if defined(OS_ANDROID) |
| 106 #include "chrome/browser/media/protected_media_identifier_permission_context.h" | 106 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
| 107 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" | 107 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 #if defined(OS_CHROMEOS) | 110 #if defined(OS_CHROMEOS) |
| 111 #include "chrome/browser/chromeos/locale_change_guard.h" | 111 #include "chrome/browser/chromeos/locale_change_guard.h" |
| 112 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 113 #include "chrome/browser/chromeos/preferences.h" | 112 #include "chrome/browser/chromeos/preferences.h" |
| 114 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 113 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 114 #include "components/user_manager/user_manager.h" |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 117 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
| 118 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" | 118 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.
h" |
| 119 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 119 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 120 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" | 120 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
| 121 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" | 121 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.
h" |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 #if defined(ENABLE_CONFIGURATION_POLICY) | 124 #if defined(ENABLE_CONFIGURATION_POLICY) |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 default: { | 1239 default: { |
| 1240 NOTREACHED(); | 1240 NOTREACHED(); |
| 1241 break; | 1241 break; |
| 1242 } | 1242 } |
| 1243 } | 1243 } |
| 1244 if (do_update_pref) | 1244 if (do_update_pref) |
| 1245 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1245 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
| 1246 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) | 1246 if (via != APP_LOCALE_CHANGED_VIA_PUBLIC_SESSION_LOGIN) |
| 1247 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1247 local_state->SetString(prefs::kApplicationLocale, new_locale); |
| 1248 | 1248 |
| 1249 if (chromeos::UserManager::Get()->GetOwnerEmail() == | 1249 if (user_manager::UserManager::Get()->GetOwnerEmail() == |
| 1250 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) | 1250 chromeos::ProfileHelper::Get()->GetUserByProfile(this)->email()) |
| 1251 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1251 local_state->SetString(prefs::kOwnerLocale, new_locale); |
| 1252 } | 1252 } |
| 1253 | 1253 |
| 1254 void ProfileImpl::OnLogin() { | 1254 void ProfileImpl::OnLogin() { |
| 1255 if (locale_change_guard_ == NULL) | 1255 if (locale_change_guard_ == NULL) |
| 1256 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1256 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
| 1257 locale_change_guard_->OnLogin(); | 1257 locale_change_guard_->OnLogin(); |
| 1258 } | 1258 } |
| 1259 | 1259 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 ProfileImpl::CreateDomainReliabilityMonitor() { | 1401 ProfileImpl::CreateDomainReliabilityMonitor() { |
| 1402 domain_reliability::DomainReliabilityService* service = | 1402 domain_reliability::DomainReliabilityService* service = |
| 1403 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1403 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1404 GetForBrowserContext(this); | 1404 GetForBrowserContext(this); |
| 1405 if (!service) | 1405 if (!service) |
| 1406 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1406 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1407 | 1407 |
| 1408 return service->CreateMonitor( | 1408 return service->CreateMonitor( |
| 1409 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1409 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1410 } | 1410 } |
| OLD | NEW |