| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 break; | 1488 break; |
| 1489 } | 1489 } |
| 1490 case APP_LOCALE_CHANGED_VIA_UNKNOWN: | 1490 case APP_LOCALE_CHANGED_VIA_UNKNOWN: |
| 1491 default: { | 1491 default: { |
| 1492 NOTREACHED(); | 1492 NOTREACHED(); |
| 1493 break; | 1493 break; |
| 1494 } | 1494 } |
| 1495 } | 1495 } |
| 1496 if (do_update_pref) | 1496 if (do_update_pref) |
| 1497 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); | 1497 GetPrefs()->SetString(prefs::kApplicationLocale, new_locale); |
| 1498 local_state->SetString(prefs::kApplicationLocale, new_locale); |
| 1499 |
| 1498 if (chromeos::UserManager::Get()->current_user_is_owner()) | 1500 if (chromeos::UserManager::Get()->current_user_is_owner()) |
| 1499 local_state->SetString(prefs::kOwnerLocale, new_locale); | 1501 local_state->SetString(prefs::kOwnerLocale, new_locale); |
| 1500 local_state->SetString(prefs::kApplicationLocale, new_locale); | |
| 1501 | 1502 |
| 1502 GetPrefs()->ScheduleSavePersistentPrefs(); | 1503 GetPrefs()->ScheduleSavePersistentPrefs(); |
| 1503 local_state->ScheduleSavePersistentPrefs(); | 1504 local_state->ScheduleSavePersistentPrefs(); |
| 1504 } | 1505 } |
| 1505 | 1506 |
| 1506 void ProfileImpl::OnLogin() { | 1507 void ProfileImpl::OnLogin() { |
| 1507 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1508 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
| 1508 } | 1509 } |
| 1509 | 1510 |
| 1510 chromeos::ProxyConfigServiceImpl* | 1511 chromeos::ProxyConfigServiceImpl* |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1535 return pref_proxy_config_tracker_; | 1536 return pref_proxy_config_tracker_; |
| 1536 } | 1537 } |
| 1537 | 1538 |
| 1538 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1539 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1539 if (!prerender::PrerenderManager::IsPrerenderingEnabled()) | 1540 if (!prerender::PrerenderManager::IsPrerenderingEnabled()) |
| 1540 return NULL; | 1541 return NULL; |
| 1541 if (!prerender_manager_) | 1542 if (!prerender_manager_) |
| 1542 prerender_manager_ = new prerender::PrerenderManager(this); | 1543 prerender_manager_ = new prerender::PrerenderManager(this); |
| 1543 return prerender_manager_; | 1544 return prerender_manager_; |
| 1544 } | 1545 } |
| OLD | NEW |