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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/accounts_options_handler2.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/ui/webui/options2/chromeos/accounts_options_handler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/accounts_options_handler2.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY)); 81 IDS_OPTIONS_ACCOUNTS_OWNER_ONLY));
82 82
83 std::string owner_email; 83 std::string owner_email;
84 CrosSettings::Get()->GetString(kDeviceOwner, &owner_email); 84 CrosSettings::Get()->GetString(kDeviceOwner, &owner_email);
85 // Translate owner's email to the display email. 85 // Translate owner's email to the display email.
86 std::string display_email = 86 std::string display_email =
87 UserManager::Get()->GetUserDisplayEmail(owner_email); 87 UserManager::Get()->GetUserDisplayEmail(owner_email);
88 localized_strings->SetString("owner_user_id", UTF8ToUTF16(display_email)); 88 localized_strings->SetString("owner_user_id", UTF8ToUTF16(display_email));
89 89
90 localized_strings->SetString("current_user_is_owner", 90 localized_strings->SetString("current_user_is_owner",
91 UserManager::Get()->current_user_is_owner() ? 91 UserManager::Get()->IsCurrentUserOwner() ?
92 ASCIIToUTF16("true") : ASCIIToUTF16("false")); 92 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
93 localized_strings->SetString("logged_in_as_guest", 93 localized_strings->SetString("logged_in_as_guest",
94 UserManager::Get()->IsLoggedInAsGuest() ? 94 UserManager::Get()->IsLoggedInAsGuest() ?
95 ASCIIToUTF16("true") : ASCIIToUTF16("false")); 95 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
96 localized_strings->SetString("whitelist_is_managed", 96 localized_strings->SetString("whitelist_is_managed",
97 g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ? 97 g_browser_process->browser_policy_connector()->IsEnterpriseManaged() ?
98 ASCIIToUTF16("true") : ASCIIToUTF16("false")); 98 ASCIIToUTF16("true") : ASCIIToUTF16("false"));
99 } 99 }
100 100
101 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) { 101 void AccountsOptionsHandler::HandleWhitelistUser(const base::ListValue* args) {
(...skipping 24 matching lines...) Expand all
126 DCHECK(args && args->empty()); 126 DCHECK(args && args->empty());
127 127
128 const UserList& users = UserManager::Get()->GetUsers(); 128 const UserList& users = UserManager::Get()->GetUsers();
129 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) { 129 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) {
130 WhitelistUser((*it)->email()); 130 WhitelistUser((*it)->email());
131 } 131 }
132 } 132 }
133 133
134 } // namespace options2 134 } // namespace options2
135 } // namespace chromeos 135 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698