Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: chrome/browser/chromeos/locale_change_guard.cc

Issue 9355059: Renaming virtual setters/getters in UserManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: year Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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/chromeos/locale_change_guard.h" 5 #include "chrome/browser/chromeos/locale_change_guard.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/login/user_manager.h" 11 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (profile_ == 91 if (profile_ ==
92 content::Source<WebContents>(source)->GetBrowserContext()) { 92 content::Source<WebContents>(source)->GetBrowserContext()) {
93 // We need to perform locale change check only once, so unsubscribe. 93 // We need to perform locale change check only once, so unsubscribe.
94 registrar_.Remove(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 94 registrar_.Remove(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
95 content::NotificationService::AllSources()); 95 content::NotificationService::AllSources());
96 Check(); 96 Check();
97 } 97 }
98 break; 98 break;
99 } 99 }
100 case chrome::NOTIFICATION_OWNERSHIP_CHECKED: { 100 case chrome::NOTIFICATION_OWNERSHIP_CHECKED: {
101 if (UserManager::Get()->current_user_is_owner()) { 101 if (UserManager::Get()->IsCurrentUserOwner()) {
102 PrefService* local_state = g_browser_process->local_state(); 102 PrefService* local_state = g_browser_process->local_state();
103 if (local_state) { 103 if (local_state) {
104 PrefService* prefs = profile_->GetPrefs(); 104 PrefService* prefs = profile_->GetPrefs();
105 if (prefs == NULL) { 105 if (prefs == NULL) {
106 NOTREACHED(); 106 NOTREACHED();
107 return; 107 return;
108 } 108 }
109 std::string owner_locale = 109 std::string owner_locale =
110 prefs->GetString(prefs::kApplicationLocale); 110 prefs->GetString(prefs::kApplicationLocale);
111 if (!owner_locale.empty()) 111 if (!owner_locale.empty())
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 if (by_user) 226 if (by_user)
227 master_->AcceptLocaleChange(); 227 master_->AcceptLocaleChange();
228 } 228 }
229 229
230 std::string LocaleChangeGuard::Delegate::id() const { 230 std::string LocaleChangeGuard::Delegate::id() const {
231 // Arbitrary unique Id. 231 // Arbitrary unique Id.
232 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; 232 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5";
233 } 233 }
234 234
235 } // namespace chromeos 235 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698