Chromium Code Reviews| 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 if (chromeos::UserManager::Get()->current_user_is_owner()) | |
| 1499 local_state->SetString(prefs::kOwnerLocale, new_locale); | |
|
altimofeev
2011/03/16 11:35:54
What about the case, when the owner changes locale
Denis Lagno
2011/03/16 11:55:14
Good catch. Done.
| |
| 1500 local_state->SetString(prefs::kApplicationLocale, new_locale); | 1498 local_state->SetString(prefs::kApplicationLocale, new_locale); |
| 1501 | 1499 |
| 1502 GetPrefs()->ScheduleSavePersistentPrefs(); | 1500 GetPrefs()->ScheduleSavePersistentPrefs(); |
| 1503 local_state->ScheduleSavePersistentPrefs(); | 1501 local_state->ScheduleSavePersistentPrefs(); |
| 1504 } | 1502 } |
| 1505 | 1503 |
| 1506 void ProfileImpl::OnLogin() { | 1504 void ProfileImpl::OnLogin() { |
| 1507 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); | 1505 locale_change_guard_.reset(new chromeos::LocaleChangeGuard(this)); |
| 1508 } | 1506 } |
| 1509 | 1507 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 1535 return pref_proxy_config_tracker_; | 1533 return pref_proxy_config_tracker_; |
| 1536 } | 1534 } |
| 1537 | 1535 |
| 1538 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1536 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1539 if (!prerender::PrerenderManager::IsPrerenderingEnabled()) | 1537 if (!prerender::PrerenderManager::IsPrerenderingEnabled()) |
| 1540 return NULL; | 1538 return NULL; |
| 1541 if (!prerender_manager_) | 1539 if (!prerender_manager_) |
| 1542 prerender_manager_ = new prerender::PrerenderManager(this); | 1540 prerender_manager_ = new prerender::PrerenderManager(this); |
| 1543 return prerender_manager_; | 1541 return prerender_manager_; |
| 1544 } | 1542 } |
| OLD | NEW |