summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 13:26:57 +0000
committertreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 13:26:57 +0000
commit933cc2e2d4f2335ffec0a90ddf714f5ef416c78f (patch)
tree00f7f35568d1e8e128306a003b8f19249784c530
parent5c277ba487161758226fa835eacb00d55322dad5 (diff)
downloadchromium_src-933cc2e2d4f2335ffec0a90ddf714f5ef416c78f.zip
chromium_src-933cc2e2d4f2335ffec0a90ddf714f5ef416c78f.tar.gz
chromium_src-933cc2e2d4f2335ffec0a90ddf714f5ef416c78f.tar.bz2
Rename "managed (mode|user)" to "supervised user" (part 7)
Followup to https://codereview.chromium.org/384023002/ This CL renames ChromeOS-specific code. Still missing: - ChromeOS-specific resource IDs (strings and images) - JavaScript, HTML, CSS - The global ENABLE_MANAGED_USERS define TBR=atwilson@chromium.org (c/b/signin) TBR=nkostylev@chromium.org (c/b/chromeos) TBR=noms@chromium.org (c/b/profiles) TBR=oshima@chromium.org (ash and c/b/ui/ash) All TBRs are simple renamings. BUG=385113 Review URL: https://codereview.chromium.org/393343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284078 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash.gyp6
-rw-r--r--ash/shelf/shelf_widget.cc2
-rw-r--r--ash/system/chromeos/supervised/tray_supervised_user.cc (renamed from ash/system/chromeos/managed/tray_locally_managed_user.cc)34
-rw-r--r--ash/system/chromeos/supervised/tray_supervised_user.h (renamed from ash/system/chromeos/managed/tray_locally_managed_user.h)18
-rw-r--r--ash/system/chromeos/supervised/tray_supervised_user_unittest.cc (renamed from ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc)38
-rw-r--r--ash/system/chromeos/tray_display.cc2
-rw-r--r--ash/system/system_notifier.cc16
-rw-r--r--ash/system/system_notifier.h2
-rw-r--r--ash/system/tray/default_system_tray_delegate.cc8
-rw-r--r--ash/system/tray/default_system_tray_delegate.h8
-rw-r--r--ash/system/tray/system_tray.cc4
-rw-r--r--ash/system/tray/system_tray_delegate.h18
-rw-r--r--ash/system/user/login_status.h2
-rw-r--r--ash/system/user/tray_user.cc4
-rw-r--r--ash/system/user/user_card_view.cc2
-rw-r--r--ash/system/user/user_view.cc2
-rw-r--r--chrome/browser/chromeos/accessibility/accessibility_manager.cc2
-rw-r--r--chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc8
-rw-r--r--chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc2
-rw-r--r--chrome/browser/chromeos/display/display_preferences.cc2
-rw-r--r--chrome/browser/chromeos/display/display_preferences_unittest.cc2
-rw-r--r--chrome/browser/chromeos/login/auth/authenticator.h4
-rw-r--r--chrome/browser/chromeos/login/auth/login_performer.cc18
-rw-r--r--chrome/browser/chromeos/login/auth/login_performer.h4
-rw-r--r--chrome/browser/chromeos/login/auth/mock_authenticator.cc2
-rw-r--r--chrome/browser/chromeos/login/auth/mock_authenticator.h2
-rw-r--r--chrome/browser/chromeos/login/auth/parallel_authenticator.cc10
-rw-r--r--chrome/browser/chromeos/login/auth/parallel_authenticator.h6
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc16
-rw-r--r--chrome/browser/chromeos/login/fake_login_utils.cc2
-rw-r--r--chrome/browser/chromeos/login/lock/screen_locker.cc4
-rw-r--r--chrome/browser/chromeos/login/login_screen_policy_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc2
-rw-r--r--chrome/browser/chromeos/login/managed/managed_user_creation_controller.cc30
-rw-r--r--chrome/browser/chromeos/login/screens/error_screen.h2
-rw-r--r--chrome/browser/chromeos/login/screens/screen_factory.cc12
-rw-r--r--chrome/browser/chromeos/login/screens/screen_factory.h2
-rw-r--r--chrome/browser/chromeos/login/screens/user_selection_screen.cc14
-rw-r--r--chrome/browser/chromeos/login/session/user_session_manager.cc6
-rw-r--r--chrome/browser/chromeos/login/signin/auth_sync_observer.cc6
-rw-r--r--chrome/browser/chromeos/login/signin/oauth2_login_manager.cc4
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc (renamed from chrome/browser/chromeos/login/managed/supervised_user_authentication.cc)6
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_authentication.h (renamed from chrome/browser/chromeos/login/managed/supervised_user_authentication.h)10
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_authentication_unittest.cc (renamed from chrome/browser/chromeos/login/managed/supervised_user_authentication_unittest.cc)2
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc (renamed from chrome/browser/chromeos/login/managed/managed_user_authenticator.cc)114
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_authenticator.h (renamed from chrome/browser/chromeos/login/managed/managed_user_authenticator.h)22
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_constants.cc (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_constants.cc)4
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_constants.h (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_constants.h)8
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc (renamed from chrome/browser/chromeos/login/managed/managed_user_creation_browsertest.cc)20
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.cc30
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h (renamed from chrome/browser/chromeos/login/managed/managed_user_creation_controller.h)28
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc (renamed from chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.cc)83
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h (renamed from chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h)44
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.cc (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.cc)34
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h)18
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc)123
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h (renamed from chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h)54
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_login_flow.cc (renamed from chrome/browser/chromeos/login/managed/supervised_user_login_flow.cc)10
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h (renamed from chrome/browser/chromeos/login/managed/supervised_user_login_flow.h)10
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_password_browsertest.cc (renamed from chrome/browser/chromeos/login/managed/managed_user_password_browsertest.cc)26
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc (renamed from chrome/browser/chromeos/login/managed/managed_user_test_base.cc)58
-rw-r--r--chrome/browser/chromeos/login/supervised/supervised_user_test_base.h (renamed from chrome/browser/chromeos/login/managed/managed_user_test_base.h)26
-rw-r--r--chrome/browser/chromeos/login/ui/oobe_display.h10
-rw-r--r--chrome/browser/chromeos/login/users/fake_supervised_user_manager.cc8
-rw-r--r--chrome/browser/chromeos/login/users/fake_user_manager.cc4
-rw-r--r--chrome/browser/chromeos/login/users/fake_user_manager.h4
-rw-r--r--chrome/browser/chromeos/login/users/mock_user_manager.h4
-rw-r--r--chrome/browser/chromeos/login/users/supervised_user_manager.h4
-rw-r--r--chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc96
-rw-r--r--chrome/browser/chromeos/login/users/supervised_user_manager_impl.h2
-rw-r--r--chrome/browser/chromeos/login/users/user.cc24
-rw-r--r--chrome/browser/chromeos/login/users/user.h2
-rw-r--r--chrome/browser/chromeos/login/users/user_manager.h8
-rw-r--r--chrome/browser/chromeos/login/users/user_manager_impl.cc48
-rw-r--r--chrome/browser/chromeos/login/users/user_manager_impl.h12
-rw-r--r--chrome/browser/chromeos/login/users/user_manager_unittest.cc4
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc28
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.h13
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc2
-rw-r--r--chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc8
-rw-r--r--chrome/browser/chromeos/profiles/profile_util.h2
-rw-r--r--chrome/browser/profiles/profile_impl.h4
-rw-r--r--chrome/browser/signin/chrome_signin_client.cc2
-rw-r--r--chrome/browser/supervised_user/chromeos/manager_password_service.cc6
-rw-r--r--chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc2
-rw-r--r--chrome/browser/supervised_user/chromeos/supervised_user_password_service_factory.cc2
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.cc21
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_chromeos.h9
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_linux.cc9
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_win.cc9
-rw-r--r--chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc20
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.cc28
-rw-r--r--chrome/browser/ui/webui/chromeos/login/oobe_ui.h10
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc8
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h6
-rw-r--r--chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc (renamed from chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc)127
-rw-r--r--chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h (renamed from chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h)50
-rw-r--r--chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc2
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc2
-rw-r--r--chrome/chrome_browser_chromeos.gypi32
-rw-r--r--chrome/chrome_browser_ui.gypi4
-rw-r--r--chrome/chrome_tests.gypi8
-rw-r--r--chrome/chrome_tests_unit.gypi4
-rw-r--r--chromeos/login/login_state.cc4
-rw-r--r--chromeos/login/login_state.h4
-rw-r--r--chromeos/login/user_names.cc2
-rw-r--r--chromeos/login/user_names.h4
-rw-r--r--components/user_manager/user_type.h5
108 files changed, 864 insertions, 865 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 544f089..31bae431 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -285,8 +285,6 @@
'system/chromeos/keyboard_brightness_controller.h',
'system/chromeos/label_tray_view.cc',
'system/chromeos/label_tray_view.h',
- 'system/chromeos/managed/tray_locally_managed_user.cc',
- 'system/chromeos/managed/tray_locally_managed_user.h',
'system/chromeos/network/network_connect.cc',
'system/chromeos/network/network_connect.h',
'system/chromeos/network/network_detailed_view.h',
@@ -339,6 +337,8 @@
'system/chromeos/session/tray_session_length_limit.h',
'system/chromeos/settings/tray_settings.cc',
'system/chromeos/settings/tray_settings.h',
+ 'system/chromeos/supervised/tray_supervised_user.cc',
+ 'system/chromeos/supervised/tray_supervised_user.h',
'system/chromeos/system_clock_observer.cc',
'system/chromeos/system_clock_observer.h',
'system/chromeos/tray_caps_lock.cc',
@@ -799,7 +799,6 @@
'sticky_keys/sticky_keys_overlay_unittest.cc',
'sticky_keys/sticky_keys_unittest.cc',
'system/chromeos/brightness/tray_brightness_unittest.cc',
- 'system/chromeos/managed/tray_locally_managed_user_unittest.cc',
'system/chromeos/network/network_state_notifier_unittest.cc',
'system/chromeos/power/power_event_observer_unittest.cc',
'system/chromeos/power/power_status_unittest.cc',
@@ -809,6 +808,7 @@
'system/chromeos/screen_security/screen_tray_item_unittest.cc',
'system/chromeos/session/logout_confirmation_controller_unittest.cc',
'system/chromeos/session/tray_session_length_limit_unittest.cc',
+ 'system/chromeos/supervised/tray_supervised_user_unittest.cc',
'system/chromeos/tray_display_unittest.cc',
'system/date/date_view_unittest.cc',
'system/overview/overview_button_tray_unittest.cc',
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 30b1990..0f47ac2 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -688,7 +688,7 @@ bool ShelfWidget::ShelfAlignmentAllowed() {
return true;
case user::LOGGED_IN_LOCKED:
case user::LOGGED_IN_PUBLIC:
- case user::LOGGED_IN_LOCALLY_MANAGED:
+ case user::LOGGED_IN_SUPERVISED:
case user::LOGGED_IN_GUEST:
case user::LOGGED_IN_RETAIL_MODE:
case user::LOGGED_IN_KIOSK_APP:
diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.cc b/ash/system/chromeos/supervised/tray_supervised_user.cc
index 7c22016..2d0012f 100644
--- a/ash/system/chromeos/managed/tray_locally_managed_user.cc
+++ b/ash/system/chromeos/supervised/tray_supervised_user.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
+#include "ash/system/chromeos/supervised/tray_supervised_user.h"
#include "ash/shell.h"
#include "ash/system/chromeos/label_tray_view.h"
@@ -22,21 +22,21 @@ using message_center::Notification;
namespace ash {
-const char TrayLocallyManagedUser::kNotificationId[] =
+const char TraySupervisedUser::kNotificationId[] =
"chrome://user/locally-managed";
-TrayLocallyManagedUser::TrayLocallyManagedUser(SystemTray* system_tray)
+TraySupervisedUser::TraySupervisedUser(SystemTray* system_tray)
: SystemTrayItem(system_tray),
tray_view_(NULL),
status_(ash::user::LOGGED_IN_NONE) {
}
-TrayLocallyManagedUser::~TrayLocallyManagedUser() {
+TraySupervisedUser::~TraySupervisedUser() {
}
-void TrayLocallyManagedUser::UpdateMessage() {
+void TraySupervisedUser::UpdateMessage() {
base::string16 message = Shell::GetInstance()->system_tray_delegate()->
- GetLocallyManagedUserMessage();
+ GetSupervisedUserMessage();
if (tray_view_)
tray_view_->SetMessage(message);
if (message_center::MessageCenter::Get()->FindVisibleNotificationById(
@@ -44,10 +44,10 @@ void TrayLocallyManagedUser::UpdateMessage() {
CreateOrUpdateNotification(message);
}
-views::View* TrayLocallyManagedUser::CreateDefaultView(
+views::View* TraySupervisedUser::CreateDefaultView(
user::LoginStatus status) {
CHECK(tray_view_ == NULL);
- if (status != ash::user::LOGGED_IN_LOCALLY_MANAGED)
+ if (status != ash::user::LOGGED_IN_SUPERVISED)
return NULL;
tray_view_ = new LabelTrayView(this, IDR_AURA_UBER_TRAY_MANAGED_USER);
@@ -55,27 +55,27 @@ views::View* TrayLocallyManagedUser::CreateDefaultView(
return tray_view_;
}
-void TrayLocallyManagedUser::DestroyDefaultView() {
+void TraySupervisedUser::DestroyDefaultView() {
tray_view_ = NULL;
}
-void TrayLocallyManagedUser::OnViewClicked(views::View* sender) {
- Shell::GetInstance()->system_tray_delegate()->ShowLocallyManagedUserInfo();
+void TraySupervisedUser::OnViewClicked(views::View* sender) {
+ Shell::GetInstance()->system_tray_delegate()->ShowSupervisedUserInfo();
}
-void TrayLocallyManagedUser::UpdateAfterLoginStatusChange(
+void TraySupervisedUser::UpdateAfterLoginStatusChange(
user::LoginStatus status) {
if (status == status_)
return;
- if (status == ash::user::LOGGED_IN_LOCALLY_MANAGED &&
+ if (status == ash::user::LOGGED_IN_SUPERVISED &&
status_ != ash::user::LOGGED_IN_LOCKED) {
SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate();
- CreateOrUpdateNotification(delegate->GetLocallyManagedUserMessage());
+ CreateOrUpdateNotification(delegate->GetSupervisedUserMessage());
}
status_ = status;
}
-void TrayLocallyManagedUser::CreateOrUpdateNotification(
+void TraySupervisedUser::CreateOrUpdateNotification(
const base::string16& new_message) {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
scoped_ptr<Notification> notification(
@@ -84,7 +84,7 @@ void TrayLocallyManagedUser::CreateOrUpdateNotification(
base::string16() /* no title */,
new_message,
bundle.GetImageNamed(IDR_AURA_UBER_TRAY_MANAGED_USER),
- system_notifier::kNotifierLocallyManagedUser,
+ system_notifier::kNotifierSupervisedUser,
base::Closure() /* null callback */));
message_center::MessageCenter::Get()->AddNotification(notification.Pass());
}
diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.h b/ash/system/chromeos/supervised/tray_supervised_user.h
index 666530b..dbad222 100644
--- a/ash/system/chromeos/managed/tray_locally_managed_user.h
+++ b/ash/system/chromeos/supervised/tray_supervised_user.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
-#define ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
+#ifndef ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
+#define ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
#include "ash/ash_export.h"
#include "ash/system/tray/system_tray_item.h"
@@ -14,11 +14,11 @@ namespace ash {
class LabelTrayView;
class SystemTray;
-class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem,
+class ASH_EXPORT TraySupervisedUser : public SystemTrayItem,
public ViewClickListener {
public:
- explicit TrayLocallyManagedUser(SystemTray* system_tray);
- virtual ~TrayLocallyManagedUser();
+ explicit TraySupervisedUser(SystemTray* system_tray);
+ virtual ~TraySupervisedUser();
// If message is not empty updates content of default view, otherwise hides
// tray items.
@@ -33,7 +33,7 @@ class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem,
virtual void OnViewClicked(views::View* sender) OVERRIDE;
private:
- friend class TrayLocallyManagedUserTest;
+ friend class TraySupervisedUserTest;
static const char kNotificationId[];
@@ -43,9 +43,9 @@ class ASH_EXPORT TrayLocallyManagedUser : public SystemTrayItem,
// Previous login status to avoid showing notification upon unlock.
user::LoginStatus status_;
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUser);
+ DISALLOW_COPY_AND_ASSIGN(TraySupervisedUser);
};
} // namespace ash
-#endif // ASH_SYSTEM_CHROMEOS_LOCALLY_MANAGED_TRAY_LOCALLY_MANAGED_USER_H
+#endif // ASH_SYSTEM_CHROMEOS_SUPERVISED_TRAY_SUPERVISED_USER_H
diff --git a/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc b/ash/system/chromeos/supervised/tray_supervised_user_unittest.cc
index ca5af22..cc65056 100644
--- a/ash/system/chromeos/managed/tray_locally_managed_user_unittest.cc
+++ b/ash/system/chromeos/supervised/tray_supervised_user_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
+#include "ash/system/chromeos/supervised/tray_supervised_user.h"
#include "ash/shell.h"
#include "ash/system/user/login_status.h"
@@ -17,57 +17,57 @@ using message_center::NotificationList;
namespace ash {
-class TrayLocallyManagedUserTest : public test::AshTestBase {
+class TraySupervisedUserTest : public test::AshTestBase {
public:
- TrayLocallyManagedUserTest() {}
- virtual ~TrayLocallyManagedUserTest() {}
+ TraySupervisedUserTest() {}
+ virtual ~TraySupervisedUserTest() {}
protected:
message_center::Notification* GetPopup();
private:
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUserTest);
+ DISALLOW_COPY_AND_ASSIGN(TraySupervisedUserTest);
};
-message_center::Notification* TrayLocallyManagedUserTest::GetPopup() {
+message_center::Notification* TraySupervisedUserTest::GetPopup() {
NotificationList::PopupNotifications popups =
message_center::MessageCenter::Get()->GetPopupNotifications();
for (NotificationList::PopupNotifications::const_iterator iter =
popups.begin(); iter != popups.end(); ++iter) {
- if ((*iter)->id() == TrayLocallyManagedUser::kNotificationId)
+ if ((*iter)->id() == TraySupervisedUser::kNotificationId)
return *iter;
}
return NULL;
}
-class TrayLocallyManagedUserInitialTest : public TrayLocallyManagedUserTest {
+class TraySupervisedUserInitialTest : public TraySupervisedUserTest {
public:
- TrayLocallyManagedUserInitialTest() {}
- virtual ~TrayLocallyManagedUserInitialTest() {}
+ TraySupervisedUserInitialTest() {}
+ virtual ~TraySupervisedUserInitialTest() {}
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUserInitialTest);
+ DISALLOW_COPY_AND_ASSIGN(TraySupervisedUserInitialTest);
};
-void TrayLocallyManagedUserInitialTest::SetUp() {
+void TraySupervisedUserInitialTest::SetUp() {
test::TestSystemTrayDelegate::SetInitialLoginStatus(
- user::LOGGED_IN_LOCALLY_MANAGED);
+ user::LOGGED_IN_SUPERVISED);
test::AshTestBase::SetUp();
}
-void TrayLocallyManagedUserInitialTest::TearDown() {
+void TraySupervisedUserInitialTest::TearDown() {
test::AshTestBase::TearDown();
// SetInitialLoginStatus() is reset in AshTestHelper::TearDown().
}
-TEST_F(TrayLocallyManagedUserTest, LocallyManagedUserHasNotification) {
+TEST_F(TraySupervisedUserTest, SupervisedUserHasNotification) {
test::TestSystemTrayDelegate* delegate =
static_cast<test::TestSystemTrayDelegate*>(
ash::Shell::GetInstance()->system_tray_delegate());
- delegate->SetLoginStatus(user::LOGGED_IN_LOCALLY_MANAGED);
+ delegate->SetLoginStatus(user::LOGGED_IN_SUPERVISED);
message_center::Notification* notification = GetPopup();
ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification);
@@ -75,8 +75,8 @@ TEST_F(TrayLocallyManagedUserTest, LocallyManagedUserHasNotification) {
notification->rich_notification_data().priority);
}
-TEST_F(TrayLocallyManagedUserInitialTest, LocallyManagedUserNoCrash) {
- // Initial login status is already LOCALLY_MANAGED, which should create
+TEST_F(TraySupervisedUserInitialTest, SupervisedUserNoCrash) {
+ // Initial login status is already SUPERVISED, which should create
// the notification and should not cause crashes.
message_center::Notification* notification = GetPopup();
ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification);
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 1e02e30..d1fca84 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -120,7 +120,7 @@ void OpenSettings() {
case user::LOGGED_IN_GUEST:
case user::LOGGED_IN_RETAIL_MODE:
case user::LOGGED_IN_PUBLIC:
- case user::LOGGED_IN_LOCALLY_MANAGED:
+ case user::LOGGED_IN_SUPERVISED:
case user::LOGGED_IN_KIOSK_APP:
Shell::GetInstance()->system_tray_delegate()->ShowDisplaySettings();
}
diff --git a/ash/system/system_notifier.cc b/ash/system/system_notifier.cc
index 7669186..2910862 100644
--- a/ash/system/system_notifier.cc
+++ b/ash/system/system_notifier.cc
@@ -18,25 +18,29 @@ const char* kAlwaysShownNotifierIds[] = {
kNotifierDisplayError,
kNotifierNetworkError,
kNotifierPower,
+ // Note: Order doesn't matter here, so keep this in alphabetic order, don't
+ // just add your stuff at the end!
NULL
};
const char* kAshSystemNotifiers[] = {
+ kNotifierBluetooth,
kNotifierDisplay,
- kNotifierDisplayResolutionChange,
kNotifierDisplayError,
+ kNotifierDisplayResolutionChange,
kNotifierLocale,
- kNotifierLocallyManagedUser,
kNotifierMultiProfileFirstRun,
kNotifierNetwork,
kNotifierNetworkError,
kNotifierNetworkPortalDetector,
+ kNotifierPower,
kNotifierScreenshot,
kNotifierScreenCapture,
kNotifierScreenShare,
kNotifierSessionLengthTimeout,
- kNotifierPower,
- kNotifierBluetooth,
+ kNotifierSupervisedUser,
+ // Note: Order doesn't matter here, so keep this in alphabetic order, don't
+ // just add your stuff at the end!
NULL
};
@@ -56,10 +60,9 @@ bool MatchSystemNotifierId(const message_center::NotifierId& notifier_id,
const char kNotifierBluetooth[] = "ash.bluetooth";
const char kNotifierDisplay[] = "ash.display";
-const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change";
const char kNotifierDisplayError[] = "ash.display.error";
+const char kNotifierDisplayResolutionChange[] = "ash.display.resolution-change";
const char kNotifierLocale[] = "ash.locale";
-const char kNotifierLocallyManagedUser[] = "ash.locally-managed-user";
const char kNotifierMultiProfileFirstRun[] = "ash.multi-profile.first-run";
const char kNotifierNetwork[] = "ash.network";
const char kNotifierNetworkError[] = "ash.network.error";
@@ -69,6 +72,7 @@ const char kNotifierScreenshot[] = "ash.screenshot";
const char kNotifierScreenCapture[] = "ash.screen-capture";
const char kNotifierScreenShare[] = "ash.screen-share";
const char kNotifierSessionLengthTimeout[] = "ash.session-length-timeout";
+const char kNotifierSupervisedUser[] = "ash.locally-managed-user";
bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) {
return MatchSystemNotifierId(notifier_id, kAlwaysShownNotifierIds);
diff --git a/ash/system/system_notifier.h b/ash/system/system_notifier.h
index 0d4b6c7..db741ec 100644
--- a/ash/system/system_notifier.h
+++ b/ash/system/system_notifier.h
@@ -19,7 +19,6 @@ ASH_EXPORT extern const char kNotifierDisplay[];
ASH_EXPORT extern const char kNotifierDisplayResolutionChange[];
ASH_EXPORT extern const char kNotifierDisplayError[];
ASH_EXPORT extern const char kNotifierLocale[];
-ASH_EXPORT extern const char kNotifierLocallyManagedUser[];
ASH_EXPORT extern const char kNotifierMultiProfileFirstRun[];
ASH_EXPORT extern const char kNotifierNetwork[];
ASH_EXPORT extern const char kNotifierNetworkError[];
@@ -29,6 +28,7 @@ ASH_EXPORT extern const char kNotifierScreenshot[];
ASH_EXPORT extern const char kNotifierScreenCapture[];
ASH_EXPORT extern const char kNotifierScreenShare[];
ASH_EXPORT extern const char kNotifierSessionLengthTimeout[];
+ASH_EXPORT extern const char kNotifierSupervisedUser[];
// Returns true if notifications from |notifier_id| should always appear as
// popups. "Always appear" means the popups should appear even in login screen,
diff --git a/ash/system/tray/default_system_tray_delegate.cc b/ash/system/tray/default_system_tray_delegate.cc
index eae6bd3..839575bef 100644
--- a/ash/system/tray/default_system_tray_delegate.cc
+++ b/ash/system/tray/default_system_tray_delegate.cc
@@ -71,17 +71,17 @@ const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const {
}
const std::string
-DefaultSystemTrayDelegate::GetLocallyManagedUserManager() const {
+DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
return std::string();
}
const base::string16
-DefaultSystemTrayDelegate::GetLocallyManagedUserManagerName()
+DefaultSystemTrayDelegate::GetSupervisedUserManagerName()
const {
return base::string16();
}
-const base::string16 DefaultSystemTrayDelegate::GetLocallyManagedUserMessage()
+const base::string16 DefaultSystemTrayDelegate::GetSupervisedUserMessage()
const {
return base::string16();
}
@@ -145,7 +145,7 @@ void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
}
-void DefaultSystemTrayDelegate::ShowLocallyManagedUserInfo() {
+void DefaultSystemTrayDelegate::ShowSupervisedUserInfo() {
}
void DefaultSystemTrayDelegate::ShowUserLogin() {
diff --git a/ash/system/tray/default_system_tray_delegate.h b/ash/system/tray/default_system_tray_delegate.h
index 7586932..84594bd 100644
--- a/ash/system/tray/default_system_tray_delegate.h
+++ b/ash/system/tray/default_system_tray_delegate.h
@@ -25,10 +25,10 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
virtual void ChangeProfilePicture() OVERRIDE;
virtual const std::string GetEnterpriseDomain() const OVERRIDE;
virtual const base::string16 GetEnterpriseMessage() const OVERRIDE;
- virtual const std::string GetLocallyManagedUserManager() const OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserManagerName() const
+ virtual const std::string GetSupervisedUserManager() const OVERRIDE;
+ virtual const base::string16 GetSupervisedUserManagerName() const
OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE;
+ virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE;
virtual bool SystemShouldUpgrade() const OVERRIDE;
virtual base::HourClockType GetHourClockType() const OVERRIDE;
virtual void ShowSettings() OVERRIDE;
@@ -47,7 +47,7 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
virtual void ShowAccessibilitySettings() OVERRIDE;
virtual void ShowPublicAccountInfo() OVERRIDE;
virtual void ShowEnterpriseInfo() OVERRIDE;
- virtual void ShowLocallyManagedUserInfo() OVERRIDE;
+ virtual void ShowSupervisedUserInfo() OVERRIDE;
virtual void ShowUserLogin() OVERRIDE;
virtual bool ShowSpringChargerReplacementDialog() OVERRIDE;
virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE;
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 5c6af2c..b4ba58e 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -47,7 +47,6 @@
#include "ash/system/chromeos/audio/tray_audio_chromeos.h"
#include "ash/system/chromeos/brightness/tray_brightness.h"
#include "ash/system/chromeos/enterprise/tray_enterprise.h"
-#include "ash/system/chromeos/managed/tray_locally_managed_user.h"
#include "ash/system/chromeos/network/tray_network.h"
#include "ash/system/chromeos/network/tray_sms.h"
#include "ash/system/chromeos/network/tray_vpn.h"
@@ -57,6 +56,7 @@
#include "ash/system/chromeos/screen_security/screen_share_tray_item.h"
#include "ash/system/chromeos/session/tray_session_length_limit.h"
#include "ash/system/chromeos/settings/tray_settings.h"
+#include "ash/system/chromeos/supervised/tray_supervised_user.h"
#include "ash/system/chromeos/tray_caps_lock.h"
#include "ash/system/chromeos/tray_display.h"
#include "ash/system/chromeos/tray_tracing.h"
@@ -173,7 +173,7 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
#if defined(OS_CHROMEOS)
AddTrayItem(new TraySessionLengthLimit(this));
AddTrayItem(new TrayEnterprise(this));
- AddTrayItem(new TrayLocallyManagedUser(this));
+ AddTrayItem(new TraySupervisedUser(this));
AddTrayItem(new TrayIME(this));
AddTrayItem(tray_accessibility_);
AddTrayItem(new TrayTracing(this));
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index 73fd0ca..dffa9f1 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -140,15 +140,15 @@ class ASH_EXPORT SystemTrayDelegate {
// Returns notification for enterprise enrolled devices.
virtual const base::string16 GetEnterpriseMessage() const = 0;
- // Returns the display email of user that manages current
- // locally managed user.
- virtual const std::string GetLocallyManagedUserManager() const = 0;
+ // Returns the display email of the user that manages the current supervised
+ // user.
+ virtual const std::string GetSupervisedUserManager() const = 0;
- // Returns the name of user that manages current locally managed user.
- virtual const base::string16 GetLocallyManagedUserManagerName() const = 0;
+ // Returns the name of the user that manages the current supervised user.
+ virtual const base::string16 GetSupervisedUserManagerName() const = 0;
- // Returns notification for locally managed users.
- virtual const base::string16 GetLocallyManagedUserMessage() const = 0;
+ // Returns the notification for supervised users.
+ virtual const base::string16 GetSupervisedUserMessage() const = 0;
// Returns whether a system upgrade is available.
virtual bool SystemShouldUpgrade() const = 0;
@@ -206,8 +206,8 @@ class ASH_EXPORT SystemTrayDelegate {
// Shows information about enterprise enrolled devices.
virtual void ShowEnterpriseInfo() = 0;
- // Shows information about locally managed users.
- virtual void ShowLocallyManagedUserInfo() = 0;
+ // Shows information about supervised users.
+ virtual void ShowSupervisedUserInfo() = 0;
// Shows login UI to add other users to this session.
virtual void ShowUserLogin() = 0;
diff --git a/ash/system/user/login_status.h b/ash/system/user/login_status.h
index d08a160..97e6859 100644
--- a/ash/system/user/login_status.h
+++ b/ash/system/user/login_status.h
@@ -18,7 +18,7 @@ enum LoginStatus {
LOGGED_IN_GUEST, // A guest is logged in (i.e. incognito)
LOGGED_IN_RETAIL_MODE, // Is in retail mode
LOGGED_IN_PUBLIC, // A public account is logged in
- LOGGED_IN_LOCALLY_MANAGED, // A locally managed user is logged in
+ LOGGED_IN_SUPERVISED, // A supervised user is logged in
LOGGED_IN_KIOSK_APP // Is in kiosk app mode
};
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 91dce33..1d26441 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -140,7 +140,7 @@ void TrayUser::UpdateAfterLoginStatusChange(user::LoginStatus status) {
case user::LOGGED_IN_PUBLIC:
need_avatar = true;
break;
- case user::LOGGED_IN_LOCALLY_MANAGED:
+ case user::LOGGED_IN_SUPERVISED:
need_avatar = true;
need_label = true;
break;
@@ -171,7 +171,7 @@ void TrayUser::UpdateAfterLoginStatusChange(user::LoginStatus status) {
}
}
- if (status == user::LOGGED_IN_LOCALLY_MANAGED) {
+ if (status == user::LOGGED_IN_SUPERVISED) {
label_->SetText(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL));
} else if (status == user::LOGGED_IN_GUEST) {
diff --git a/ash/system/user/user_card_view.cc b/ash/system/user/user_card_view.cc
index 84d52b6..8549846 100644
--- a/ash/system/user/user_card_view.cc
+++ b/ash/system/user/user_card_view.cc
@@ -395,7 +395,7 @@ void UserCardView::AddUserContent(user::LoginStatus login_status,
if (login_status != user::LOGGED_IN_GUEST &&
(multiprofile_index || !IsMultiAccountSupportedAndUserActive())) {
base::string16 user_email_string =
- login_status == user::LOGGED_IN_LOCALLY_MANAGED
+ login_status == user::LOGGED_IN_SUPERVISED
? l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL)
: base::UTF8ToUTF16(
diff --git a/ash/system/user/user_view.cc b/ash/system/user/user_view.cc
index 0d66217..f3646a7 100644
--- a/ash/system/user/user_view.cc
+++ b/ash/system/user/user_view.cc
@@ -451,7 +451,7 @@ void UserView::AddUserCard(user::LoginStatus login) {
is_user_card_button_ = true;
}
AddChildViewAt(user_card_view_, 0);
- // Card for locally managed user can consume more space than currently
+ // Card for supervised user can consume more space than currently
// available. In that case we should increase system bubble's width.
if (login == user::LOGGED_IN_PUBLIC)
bubble_view->SetWidth(GetPreferredSize().width());
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
index 1df977d..1d40642 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -466,7 +466,7 @@ void AccessibilityManager::UpdateLargeCursorFromPref() {
bool AccessibilityManager::IsIncognitoAllowed() {
UserManager* user_manager = UserManager::Get();
// Supervised users can't create incognito-mode windows.
- return !(user_manager->IsLoggedInAsLocallyManagedUser());
+ return !(user_manager->IsLoggedInAsSupervisedUser());
}
bool AccessibilityManager::IsLargeCursorEnabled() {
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc b/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
index 8d759b7..ce8ee60 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
@@ -49,9 +49,9 @@ const char kTestUserName[] = "owner@invalid.domain";
const int kTestAutoclickDelayMs = 2000;
-// Test user name for locally managed user. The domain part must be matched
-// with chromeos::login::kLocallyManagedUserDomain.
-const char kTestLocallyManagedUserName[] = "test@locally-managed.localhost";
+// Test user name for supervised user. The domain part must be matched with
+// chromeos::login::kSupervisedUserDomain.
+const char kTestSupervisedUserName[] = "test@locally-managed.localhost";
class MockAccessibilityObserver {
public:
@@ -566,7 +566,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(kTestUserName,
chromeos::login::kGuestUserName,
// chromeos::login::kRetailModeUserName,
- kTestLocallyManagedUserName));
+ kTestSupervisedUserName));
IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest,
EnableOnLoginScreenAndLogin) {
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
index 3974131..7019093 100644
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
@@ -102,7 +102,7 @@ class UserWallpaperDelegate : public ash::UserWallpaperDelegate {
if (user_type != LoginState::LOGGED_IN_USER_REGULAR &&
user_type != LoginState::LOGGED_IN_USER_OWNER &&
user_type != LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT &&
- user_type != LoginState::LOGGED_IN_USER_LOCALLY_MANAGED) {
+ user_type != LoginState::LOGGED_IN_USER_SUPERVISED) {
return false;
}
const User* user = chromeos::UserManager::Get()->GetActiveUser();
diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
index 94d6796..361e15a 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -101,7 +101,7 @@ bool UserCanSaveDisplayPreference() {
UserManager* user_manager = UserManager::Get();
return user_manager->IsUserLoggedIn() &&
(user_manager->IsLoggedInAsRegularUser() ||
- user_manager->IsLoggedInAsLocallyManagedUser() ||
+ user_manager->IsLoggedInAsSupervisedUser() ||
user_manager->IsLoggedInAsKioskApp());
}
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc
index ff3e4d7..d33351e 100644
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
@@ -75,7 +75,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
.WillRepeatedly(testing::Return(true));
EXPECT_CALL(*mock_user_manager_, IsLoggedInAsRegularUser())
.WillRepeatedly(testing::Return(false));
- EXPECT_CALL(*mock_user_manager_, IsLoggedInAsLocallyManagedUser())
+ EXPECT_CALL(*mock_user_manager_, IsLoggedInAsSupervisedUser())
.WillRepeatedly(testing::Return(false));
}
diff --git a/chrome/browser/chromeos/login/auth/authenticator.h b/chrome/browser/chromeos/login/auth/authenticator.h
index 4078463..69257fd 100644
--- a/chrome/browser/chromeos/login/auth/authenticator.h
+++ b/chrome/browser/chromeos/login/auth/authenticator.h
@@ -43,8 +43,8 @@ class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
// Must be called on the UI thread.
virtual void AuthenticateToUnlock(const UserContext& user_context) = 0;
- // Initiates locally managed user login.
- virtual void LoginAsLocallyManagedUser(
+ // Initiates supervised user login.
+ virtual void LoginAsSupervisedUser(
const UserContext& user_context) = 0;
// Initiates retail mode login.
diff --git a/chrome/browser/chromeos/login/auth/login_performer.cc b/chrome/browser/chromeos/login/auth/login_performer.cc
index 7d956bf..da68349 100644
--- a/chrome/browser/chromeos/login/auth/login_performer.cc
+++ b/chrome/browser/chromeos/login/auth/login_performer.cc
@@ -15,9 +15,9 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
@@ -198,15 +198,15 @@ void LoginPerformer::PerformLogin(const UserContext& user_context,
}
}
-void LoginPerformer::LoginAsLocallyManagedUser(
+void LoginPerformer::LoginAsSupervisedUser(
const UserContext& user_context) {
- DCHECK_EQ(chromeos::login::kLocallyManagedUserDomain,
+ DCHECK_EQ(chromeos::login::kSupervisedUserDomain,
gaia::ExtractDomainName(user_context.GetUserID()));
CrosSettings* cros_settings = CrosSettings::Get();
CrosSettingsProvider::TrustedStatus status =
cros_settings->PrepareTrustedValues(
- base::Bind(&LoginPerformer::LoginAsLocallyManagedUser,
+ base::Bind(&LoginPerformer::LoginAsSupervisedUser,
weak_factory_.GetWeakPtr(),
user_context_));
// Must not proceed without signature verification.
@@ -222,8 +222,8 @@ void LoginPerformer::LoginAsLocallyManagedUser(
return;
}
- if (!UserManager::Get()->AreLocallyManagedUsersAllowed()) {
- LOG(ERROR) << "Login attempt of locally managed user detected.";
+ if (!UserManager::Get()->AreSupervisedUsersAllowed()) {
+ LOG(ERROR) << "Login attempt of supervised user detected.";
delegate_->WhiteListCheckFailed(user_context.GetUserID());
return;
}
@@ -260,7 +260,7 @@ void LoginPerformer::LoginAsLocallyManagedUser(
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&Authenticator::LoginAsLocallyManagedUser,
+ base::Bind(&Authenticator::LoginAsSupervisedUser,
authenticator_.get(),
user_context_copy));
}
diff --git a/chrome/browser/chromeos/login/auth/login_performer.h b/chrome/browser/chromeos/login/auth/login_performer.h
index aaedefb..f33cb4d 100644
--- a/chrome/browser/chromeos/login/auth/login_performer.h
+++ b/chrome/browser/chromeos/login/auth/login_performer.h
@@ -71,8 +71,8 @@ class LoginPerformer : public AuthStatusConsumer,
void PerformLogin(const UserContext& user_context,
AuthorizationMode auth_mode);
- // Performs locally managed user login with a given |user_context|.
- void LoginAsLocallyManagedUser(const UserContext& user_context);
+ // Performs supervised user login with a given |user_context|.
+ void LoginAsSupervisedUser(const UserContext& user_context);
// Performs retail mode login.
void LoginRetailMode();
diff --git a/chrome/browser/chromeos/login/auth/mock_authenticator.cc b/chrome/browser/chromeos/login/auth/mock_authenticator.cc
index 6a6bc6d..29536b3 100644
--- a/chrome/browser/chromeos/login/auth/mock_authenticator.cc
+++ b/chrome/browser/chromeos/login/auth/mock_authenticator.cc
@@ -48,7 +48,7 @@ void MockAuthenticator::AuthenticateToUnlock(
AuthenticateToLogin(NULL /* not used */, user_context);
}
-void MockAuthenticator::LoginAsLocallyManagedUser(
+void MockAuthenticator::LoginAsSupervisedUser(
const UserContext& user_context) {
UserContext new_user_context = user_context;
new_user_context.SetUserIDHash(user_context.GetUserID());
diff --git a/chrome/browser/chromeos/login/auth/mock_authenticator.h b/chrome/browser/chromeos/login/auth/mock_authenticator.h
index 70adbc0..4bd3482 100644
--- a/chrome/browser/chromeos/login/auth/mock_authenticator.h
+++ b/chrome/browser/chromeos/login/auth/mock_authenticator.h
@@ -28,7 +28,7 @@ class MockAuthenticator : public Authenticator {
virtual void AuthenticateToLogin(Profile* profile,
const UserContext& user_context) OVERRIDE;
virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
- virtual void LoginAsLocallyManagedUser(
+ virtual void LoginAsSupervisedUser(
const UserContext& user_context) OVERRIDE;
virtual void LoginRetailMode() OVERRIDE;
virtual void LoginOffTheRecord() OVERRIDE;
diff --git a/chrome/browser/chromeos/login/auth/parallel_authenticator.cc b/chrome/browser/chromeos/login/auth/parallel_authenticator.cc
index 96e3f23..1f3d375 100644
--- a/chrome/browser/chromeos/login/auth/parallel_authenticator.cc
+++ b/chrome/browser/chromeos/login/auth/parallel_authenticator.cc
@@ -300,13 +300,13 @@ void ParallelAuthenticator::AuthenticateToUnlock(
scoped_refptr<ParallelAuthenticator>(this)));
}
-void ParallelAuthenticator::LoginAsLocallyManagedUser(
+void ParallelAuthenticator::LoginAsSupervisedUser(
const UserContext& user_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// TODO(nkostylev): Pass proper value for |user_is_new| or remove (not used).
current_state_.reset(
new AuthAttemptState(user_context,
- user_manager::USER_TYPE_LOCALLY_MANAGED,
+ user_manager::USER_TYPE_SUPERVISED,
false, // unlock
false, // online_complete
false)); // user_is_new
@@ -655,7 +655,7 @@ void ParallelAuthenticator::Resolve() {
FROM_HERE,
base::Bind(&ParallelAuthenticator::OnAuthSuccess, this));
break;
- case LOCALLY_MANAGED_USER_LOGIN:
+ case SUPERVISED_USER_LOGIN:
current_state_->user_context.SetIsUsingOAuth(false);
BrowserThread::PostTask(
BrowserThread::UI,
@@ -800,8 +800,8 @@ ParallelAuthenticator::ResolveCryptohomeSuccessState() {
return PUBLIC_ACCOUNT_LOGIN;
if (current_state_->user_type == user_manager::USER_TYPE_KIOSK_APP)
return KIOSK_ACCOUNT_LOGIN;
- if (current_state_->user_type == user_manager::USER_TYPE_LOCALLY_MANAGED)
- return LOCALLY_MANAGED_USER_LOGIN;
+ if (current_state_->user_type == user_manager::USER_TYPE_SUPERVISED)
+ return SUPERVISED_USER_LOGIN;
if (!VerifyOwner())
return CONTINUE;
diff --git a/chrome/browser/chromeos/login/auth/parallel_authenticator.h b/chrome/browser/chromeos/login/auth/parallel_authenticator.h
index f076608..7052a99 100644
--- a/chrome/browser/chromeos/login/auth/parallel_authenticator.h
+++ b/chrome/browser/chromeos/login/auth/parallel_authenticator.h
@@ -80,7 +80,7 @@ class ParallelAuthenticator : public Authenticator,
// but offline succeeded.
GUEST_LOGIN = 17, // Logged in guest mode.
PUBLIC_ACCOUNT_LOGIN = 18, // Logged into a public account.
- LOCALLY_MANAGED_USER_LOGIN = 19, // Logged in as a locally managed user.
+ SUPERVISED_USER_LOGIN = 19, // Logged in as a supervised user.
LOGIN_FAILED = 20, // Login denied.
OWNER_REQUIRED = 21, // Login is restricted to the owner only.
FAILED_USERNAME_HASH = 22, // Failed GetSanitizedUsername request.
@@ -112,10 +112,10 @@ class ParallelAuthenticator : public Authenticator,
// AuthenticateToLogin does.
virtual void AuthenticateToUnlock(const UserContext& user_context) OVERRIDE;
- // Initiates locally managed user login.
+ // Initiates supervised user login.
// Creates cryptohome if missing or mounts existing one and
// notifies consumer on the success/failure.
- virtual void LoginAsLocallyManagedUser(
+ virtual void LoginAsSupervisedUser(
const UserContext& user_context) OVERRIDE;
// Initiates retail mode login.
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index f8509df..5630d4e 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -198,9 +198,9 @@ void ExistingUserController::UpdateLoginDisplay(const UserList& users) {
&show_users_on_signin);
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
// TODO(xiyuan): Clean user profile whose email is not in whitelist.
- bool meets_locally_managed_requirements =
- (*it)->GetType() != user_manager::USER_TYPE_LOCALLY_MANAGED ||
- UserManager::Get()->AreLocallyManagedUsersAllowed();
+ bool meets_supervised_requirements =
+ (*it)->GetType() != user_manager::USER_TYPE_SUPERVISED ||
+ UserManager::Get()->AreSupervisedUsersAllowed();
bool meets_whitelist_requirements =
LoginUtils::IsWhitelisted((*it)->email(), NULL) ||
(*it)->GetType() != user_manager::USER_TYPE_REGULAR;
@@ -209,7 +209,7 @@ void ExistingUserController::UpdateLoginDisplay(const UserList& users) {
bool meets_show_users_requirements =
show_users_on_signin ||
(*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
- if (meets_locally_managed_requirements &&
+ if (meets_supervised_requirements &&
meets_whitelist_requirements &&
meets_show_users_requirements) {
filtered_users.push_back(*it);
@@ -453,8 +453,8 @@ void ExistingUserController::PerformLogin(
is_login_in_progress_ = true;
if (gaia::ExtractDomainName(user_context.GetUserID()) ==
- chromeos::login::kLocallyManagedUserDomain) {
- login_performer_->LoginAsLocallyManagedUser(user_context);
+ chromeos::login::kSupervisedUserDomain) {
+ login_performer_->LoginAsSupervisedUser(user_context);
} else {
login_performer_->PerformLogin(user_context, auth_mode);
}
@@ -818,7 +818,7 @@ void ExistingUserController::OnProfilePrepared(Profile* profile) {
UserManager* user_manager = UserManager::Get();
if (user_manager->IsCurrentUserNew() &&
- user_manager->IsLoggedInAsLocallyManagedUser()) {
+ user_manager->IsLoggedInAsSupervisedUser()) {
// Supervised users should launch into empty desktop on first run.
CommandLine::ForCurrentProcess()->AppendSwitch(::switches::kSilentLaunch);
}
@@ -1134,7 +1134,7 @@ void ExistingUserController::ShowError(int error_id,
if (num_login_attempts_ > 1) {
const User* user =
UserManager::Get()->FindUser(last_login_attempt_username_);
- if (user && (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED))
+ if (user && (user->GetType() == user_manager::USER_TYPE_SUPERVISED))
error_id = IDS_LOGIN_ERROR_AUTHENTICATING_2ND_TIME_SUPERVISED;
}
}
diff --git a/chrome/browser/chromeos/login/fake_login_utils.cc b/chrome/browser/chromeos/login/fake_login_utils.cc
index 8850cb0..cd2f4ee 100644
--- a/chrome/browser/chromeos/login/fake_login_utils.cc
+++ b/chrome/browser/chromeos/login/fake_login_utils.cc
@@ -70,7 +70,7 @@ void FakeLoginUtils::PrepareProfile(const UserContext& user_context,
profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
user_context.GetUserID());
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
+ if (UserManager::Get()->IsLoggedInAsSupervisedUser()) {
User* active_user = UserManager::Get()->GetActiveUser();
std::string supervised_user_sync_id =
UserManager::Get()->GetSupervisedUserManager()->
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index 1afd4f8..6afa626 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -30,7 +30,7 @@
#include "chrome/browser/chromeos/login/auth/login_performer.h"
#include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
@@ -251,7 +251,7 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
// Special case: supervised users. Use special authenticator.
if (const User* user = FindUnlockUser(user_context.GetUserID())) {
- if (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) {
+ if (user->GetType() == user_manager::USER_TYPE_SUPERVISED) {
UserContext updated_context = UserManager::Get()
->GetSupervisedUserManager()
->GetAuthentication()
diff --git a/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc b/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc
index 91dfa32..9743499 100644
--- a/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_screen_policy_browsertest.cc
@@ -31,7 +31,7 @@ class LoginScreenPolicyTest : public policy::DevicePolicyCrosBrowserTest {
};
IN_PROC_BROWSER_TEST_F(LoginScreenPolicyTest, DisableSupervisedUsers) {
- EXPECT_FALSE(chromeos::UserManager::Get()->AreLocallyManagedUsersAllowed());
+ EXPECT_FALSE(chromeos::UserManager::Get()->AreSupervisedUsersAllowed());
scoped_refptr<content::MessageLoopRunner> runner(
new content::MessageLoopRunner);
@@ -46,7 +46,7 @@ IN_PROC_BROWSER_TEST_F(LoginScreenPolicyTest, DisableSupervisedUsers) {
runner->Run();
- EXPECT_TRUE(chromeos::UserManager::Get()->AreLocallyManagedUsersAllowed());
+ EXPECT_TRUE(chromeos::UserManager::Get()->AreSupervisedUsersAllowed());
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 06035dd..199e718 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -108,7 +108,7 @@ bool NeedRestartToApplyPerSessionFlags(const CommandLine& user_flags) {
return false;
// Only restart if needed and if not going into managed mode.
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser())
+ if (UserManager::Get()->IsLoggedInAsSupervisedUser())
return false;
if (about_flags::AreSwitchesIdenticalToCurrentCommandLine(
diff --git a/chrome/browser/chromeos/login/managed/managed_user_creation_controller.cc b/chrome/browser/chromeos/login/managed/managed_user_creation_controller.cc
deleted file mode 100644
index f834ad3..0000000
--- a/chrome/browser/chromeos/login/managed/managed_user_creation_controller.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller.h"
-
-namespace chromeos {
-
-// static
-const int ManagedUserCreationController::kDummyAvatarIndex = -111;
-
-ManagedUserCreationController::StatusConsumer::~StatusConsumer() {}
-
-// static
-ManagedUserCreationController*
- ManagedUserCreationController::current_controller_ = NULL;
-
-ManagedUserCreationController::ManagedUserCreationController(
- ManagedUserCreationController::StatusConsumer* consumer)
- : consumer_(consumer) {
- DCHECK(!current_controller_) << "More than one controller exist.";
- current_controller_ = this;
-}
-
-ManagedUserCreationController::~ManagedUserCreationController() {
- current_controller_ = NULL;
-}
-
-} // namespace chromeos
-
diff --git a/chrome/browser/chromeos/login/screens/error_screen.h b/chrome/browser/chromeos/login/screens/error_screen.h
index 27fad66..9765778 100644
--- a/chrome/browser/chromeos/login/screens/error_screen.h
+++ b/chrome/browser/chromeos/login/screens/error_screen.h
@@ -28,7 +28,7 @@ class ErrorScreen : public WizardScreen,
UI_STATE_UNKNOWN = 0,
UI_STATE_UPDATE,
UI_STATE_SIGNIN,
- UI_STATE_LOCALLY_MANAGED,
+ UI_STATE_SUPERVISED,
UI_STATE_KIOSK_MODE,
UI_STATE_LOCAL_STATE_ERROR,
UI_STATE_AUTO_ENROLLMENT_ERROR,
diff --git a/chrome/browser/chromeos/login/screens/screen_factory.cc b/chrome/browser/chromeos/login/screens/screen_factory.cc
index 216405b..0496e8c 100644
--- a/chrome/browser/chromeos/login/screens/screen_factory.cc
+++ b/chrome/browser/chromeos/login/screens/screen_factory.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/chromeos/login/screens/screen_factory.h"
#include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h"
#include "chrome/browser/chromeos/login/screens/base_screen.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
#include "chrome/browser/chromeos/login/screens/eula_screen.h"
@@ -16,6 +15,7 @@
#include "chrome/browser/chromeos/login/screens/update_screen.h"
#include "chrome/browser/chromeos/login/screens/user_image_screen.h"
#include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
namespace chromeos {
@@ -24,10 +24,10 @@ const char ScreenFactory::kEnrollmentScreenId[] = "enroll";
const char ScreenFactory::kErrorScreenId[] = "error-message";
const char ScreenFactory::kEulaScreenId[] = "eula";
const char ScreenFactory::kKioskAutolaunchScreenId[] = "autolaunch";
-const char ScreenFactory::kLocallyManagedUserCreationScreenId[] =
- "locally-managed-user-creation-flow";
const char ScreenFactory::kNetworkScreenId[] = "network";
const char ScreenFactory::kResetScreenId[] = "reset";
+const char ScreenFactory::kSupervisedUserCreationScreenId[] =
+ "locally-managed-user-creation-flow";
const char ScreenFactory::kTermsOfServiceScreenId[] = "tos";
const char ScreenFactory::kUpdateScreenId[] = "update";
const char ScreenFactory::kUserImageScreenId[] = "image";
@@ -75,10 +75,10 @@ BaseScreen* ScreenFactory::CreateScreenImpl(const std::string& id) {
return new WrongHWIDScreen(
observer_,
oobe_display_->GetWrongHWIDScreenActor());
- } else if (id == kLocallyManagedUserCreationScreenId) {
- return new LocallyManagedUserCreationScreen(
+ } else if (id == kSupervisedUserCreationScreenId) {
+ return new SupervisedUserCreationScreen(
observer_,
- oobe_display_->GetLocallyManagedUserCreationScreenActor());
+ oobe_display_->GetSupervisedUserCreationScreenActor());
} else if (id == kErrorScreenId) {
return new ErrorScreen(observer_, oobe_display_->GetErrorScreenActor());
}
diff --git a/chrome/browser/chromeos/login/screens/screen_factory.h b/chrome/browser/chromeos/login/screens/screen_factory.h
index 9ab6a4c..3688069 100644
--- a/chrome/browser/chromeos/login/screens/screen_factory.h
+++ b/chrome/browser/chromeos/login/screens/screen_factory.h
@@ -22,10 +22,10 @@ class ScreenFactory {
static const char kErrorScreenId[];
static const char kEulaScreenId[];
static const char kKioskAutolaunchScreenId[];
- static const char kLocallyManagedUserCreationScreenId[];
static const char kLoginScreenId[];
static const char kNetworkScreenId[];
static const char kResetScreenId[];
+ static const char kSupervisedUserCreationScreenId[];
static const char kTermsOfServiceScreenId[];
static const char kUpdateScreenId[];
static const char kUserImageScreenId[];
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
index e80dfaf..8e12c9b 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -27,7 +27,7 @@ const char kKeyDisplayName[] = "displayName";
const char kKeyEmailAddress[] = "emailAddress";
const char kKeyEnterpriseDomain[] = "enterpriseDomain";
const char kKeyPublicAccount[] = "publicAccount";
-const char kKeyLocallyManagedUser[] = "locallyManagedUser";
+const char kKeySupervisedUser[] = "locallyManagedUser";
const char kKeySignedIn[] = "signedIn";
const char kKeyCanRemove[] = "canRemove";
const char kKeyIsOwner[] = "isOwner";
@@ -63,14 +63,14 @@ void UserSelectionScreen::FillUserDictionary(
const std::string& user_id = user->email();
const bool is_public_account =
user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
- const bool is_locally_managed_user =
- user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED;
+ const bool is_supervised_user =
+ user->GetType() == user_manager::USER_TYPE_SUPERVISED;
user_dict->SetString(kKeyUsername, user_id);
user_dict->SetString(kKeyEmailAddress, user->display_email());
user_dict->SetString(kKeyDisplayName, user->GetDisplayName());
user_dict->SetBoolean(kKeyPublicAccount, is_public_account);
- user_dict->SetBoolean(kKeyLocallyManagedUser, is_locally_managed_user);
+ user_dict->SetBoolean(kKeySupervisedUser, is_supervised_user);
user_dict->SetInteger(kKeyInitialAuthType, auth_type);
user_dict->SetBoolean(kKeySignedIn, user->is_logged_in());
user_dict->SetBoolean(kKeyIsOwner, is_owner);
@@ -114,12 +114,12 @@ bool UserSelectionScreen::ShouldForceOnlineSignIn(const User* user) {
return false;
const User::OAuthTokenStatus token_status = user->oauth_token_status();
- const bool is_locally_managed_user =
- user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED;
+ const bool is_supervised_user =
+ user->GetType() == user_manager::USER_TYPE_SUPERVISED;
const bool is_public_session =
user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
- if (is_locally_managed_user &&
+ if (is_supervised_user &&
token_status == User::OAUTH_TOKEN_STATUS_UNKNOWN) {
return false;
}
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 95241b4..9fe5a4e 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -598,13 +598,13 @@ void UserSessionManager::InitProfilePreferences(Profile* profile,
if (UserManager::Get()->IsCurrentUserNew())
SetFirstLoginPrefs(profile->GetPrefs());
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
+ if (UserManager::Get()->IsLoggedInAsSupervisedUser()) {
User* active_user = UserManager::Get()->GetActiveUser();
- std::string managed_user_sync_id =
+ std::string supervised_user_sync_id =
UserManager::Get()->GetSupervisedUserManager()->
GetUserSyncId(active_user->email());
profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
- managed_user_sync_id);
+ supervised_user_sync_id);
} else if (UserManager::Get()->IsLoggedInAsRegularUser()) {
// Make sure that the google service username is properly set (we do this
// on every sign in, not just the first login, to deal with existing
diff --git a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
index a0ed887..c2ced0b 100644
--- a/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
+++ b/chrome/browser/chromeos/login/signin/auth_sync_observer.cc
@@ -45,7 +45,7 @@ void AuthSyncObserver::Shutdown() {
void AuthSyncObserver::OnStateChanged() {
DCHECK(UserManager::Get()->IsLoggedInAsRegularUser() ||
- UserManager::Get()->IsLoggedInAsLocallyManagedUser());
+ UserManager::Get()->IsLoggedInAsSupervisedUser());
ProfileSyncService* sync_service =
ProfileSyncServiceFactory::GetForProfile(profile_);
User* user = ProfileHelper::Get()->GetUserByProfile(profile_);
@@ -66,7 +66,7 @@ void AuthSyncObserver::OnStateChanged() {
User::OAuthTokenStatus old_status = user->oauth_token_status();
UserManager::Get()->SaveUserOAuthStatus(email,
User::OAUTH2_TOKEN_STATUS_INVALID);
- if (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED &&
+ if (user->GetType() == user_manager::USER_TYPE_SUPERVISED &&
old_status != User::OAUTH2_TOKEN_STATUS_INVALID) {
// Attempt to restore token from file.
UserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken(
@@ -77,7 +77,7 @@ void AuthSyncObserver::OnStateChanged() {
base::UserMetricsAction("ManagedUsers_Chromeos_Sync_Invalidated"));
}
} else if (state == GoogleServiceAuthError::NONE) {
- if (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED &&
+ if (user->GetType() == user_manager::USER_TYPE_SUPERVISED &&
user->oauth_token_status() == User::OAUTH2_TOKEN_STATUS_INVALID) {
LOG(ERROR) <<
"Got an incorrectly invalidated token case, restoring token status.";
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
index edd20df..451c0ec 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
@@ -138,8 +138,8 @@ void OAuth2LoginManager::OnRefreshTokenAvailable(
// Do not validate tokens for supervised users, as they don't actually have
// oauth2 token.
- if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
- VLOG(1) << "Logged in as managed user, skip token validation.";
+ if (UserManager::Get()->IsLoggedInAsSupervisedUser()) {
+ VLOG(1) << "Logged in as supervised user, skip token validation.";
return;
}
// Only restore session cookies for the primary account in the profile.
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
index 5679d8d..efc47ca 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_authentication.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "base/base64.h"
#include "base/json/json_file_value_serializer.h"
@@ -11,7 +11,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/sequenced_worker_pool.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_authentication.h b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.h
index 3c70ed2..6be202e 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_authentication.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.h
@@ -1,15 +1,15 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_AUTHENTICATION_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_AUTHENTICATION_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATION_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATION_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h"
#include "chromeos/login/auth/user_context.h"
namespace chromeos {
@@ -121,4 +121,4 @@ class SupervisedUserAuthentication {
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_AUTHENTICATION_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATION_H_
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_authentication_unittest.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authentication_unittest.cc
index e288e0e..425dfd8 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_authentication_unittest.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication_unittest.cc
@@ -1,7 +1,7 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
diff --git a/chrome/browser/chromeos/login/managed/managed_user_authenticator.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
index feae73b..7cb8514 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_authenticator.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/managed_user_authenticator.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authenticator.h"
#include "base/bind.h"
#include "base/strings/string_number_conversions.h"
@@ -26,8 +26,8 @@ namespace chromeos {
namespace {
// Records status and calls resolver->Resolve().
-void TriggerResolve(ManagedUserAuthenticator::AuthAttempt* attempt,
- scoped_refptr<ManagedUserAuthenticator> resolver,
+void TriggerResolve(SupervisedUserAuthenticator::AuthAttempt* attempt,
+ scoped_refptr<SupervisedUserAuthenticator> resolver,
bool success,
cryptohome::MountError return_code) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -36,8 +36,8 @@ void TriggerResolve(ManagedUserAuthenticator::AuthAttempt* attempt,
}
// Records status and calls resolver->Resolve().
-void TriggerResolveResult(ManagedUserAuthenticator::AuthAttempt* attempt,
- scoped_refptr<ManagedUserAuthenticator> resolver,
+void TriggerResolveResult(SupervisedUserAuthenticator::AuthAttempt* attempt,
+ scoped_refptr<SupervisedUserAuthenticator> resolver,
bool success,
const std::string& result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -48,8 +48,8 @@ void TriggerResolveResult(ManagedUserAuthenticator::AuthAttempt* attempt,
// Calls TriggerResolve while adding login time marker.
void TriggerResolveWithLoginTimeMarker(
const std::string& marker_name,
- ManagedUserAuthenticator::AuthAttempt* attempt,
- scoped_refptr<ManagedUserAuthenticator> resolver,
+ SupervisedUserAuthenticator::AuthAttempt* attempt,
+ scoped_refptr<SupervisedUserAuthenticator> resolver,
bool success,
cryptohome::MountError return_code) {
chromeos::BootTimesLoader::Get()->AddLoginTimeMarker(marker_name, false);
@@ -57,8 +57,8 @@ void TriggerResolveWithLoginTimeMarker(
}
// Calls cryptohome's mount method.
-void Mount(ManagedUserAuthenticator::AuthAttempt* attempt,
- scoped_refptr<ManagedUserAuthenticator> resolver,
+void Mount(SupervisedUserAuthenticator::AuthAttempt* attempt,
+ scoped_refptr<SupervisedUserAuthenticator> resolver,
int flags,
const std::string& system_salt) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -82,8 +82,8 @@ void Mount(ManagedUserAuthenticator::AuthAttempt* attempt,
}
// Calls cryptohome's addKey method.
-void AddKey(ManagedUserAuthenticator::AuthAttempt* attempt,
- scoped_refptr<ManagedUserAuthenticator> resolver,
+void AddKey(SupervisedUserAuthenticator::AuthAttempt* attempt,
+ scoped_refptr<SupervisedUserAuthenticator> resolver,
const std::string& plain_text_master_key,
const std::string& system_salt) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -106,60 +106,61 @@ void AddKey(ManagedUserAuthenticator::AuthAttempt* attempt,
} // namespace
-ManagedUserAuthenticator::ManagedUserAuthenticator(AuthStatusConsumer* consumer)
+SupervisedUserAuthenticator::SupervisedUserAuthenticator(
+ AuthStatusConsumer* consumer)
: consumer_(consumer) {}
-void ManagedUserAuthenticator::AuthenticateToMount(
+void SupervisedUserAuthenticator::AuthenticateToMount(
const std::string& username,
const std::string& password) {
std::string canonicalized = gaia::CanonicalizeEmail(username);
- current_state_.reset(new ManagedUserAuthenticator::AuthAttempt(
+ current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
canonicalized, password, false));
SystemSaltGetter::Get()->GetSystemSalt(
base::Bind(&Mount,
current_state_.get(),
- scoped_refptr<ManagedUserAuthenticator>(this),
+ scoped_refptr<SupervisedUserAuthenticator>(this),
cryptohome::MOUNT_FLAGS_NONE));
}
-void ManagedUserAuthenticator::AuthenticateToCreate(
+void SupervisedUserAuthenticator::AuthenticateToCreate(
const std::string& username,
const std::string& password) {
std::string canonicalized = gaia::CanonicalizeEmail(username);
- current_state_.reset(new ManagedUserAuthenticator::AuthAttempt(
+ current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
canonicalized, password, false));
SystemSaltGetter::Get()->GetSystemSalt(
base::Bind(&Mount,
current_state_.get(),
- scoped_refptr<ManagedUserAuthenticator>(this),
+ scoped_refptr<SupervisedUserAuthenticator>(this),
cryptohome::CREATE_IF_MISSING));
}
-void ManagedUserAuthenticator::AddMasterKey(
+void SupervisedUserAuthenticator::AddMasterKey(
const std::string& username,
const std::string& password,
const std::string& master_key) {
std::string canonicalized = gaia::CanonicalizeEmail(username);
- current_state_.reset(new ManagedUserAuthenticator::AuthAttempt(
+ current_state_.reset(new SupervisedUserAuthenticator::AuthAttempt(
canonicalized, password, true));
SystemSaltGetter::Get()->GetSystemSalt(
base::Bind(&AddKey,
current_state_.get(),
- scoped_refptr<ManagedUserAuthenticator>(this),
+ scoped_refptr<SupervisedUserAuthenticator>(this),
master_key));
}
-void ManagedUserAuthenticator::OnAuthenticationSuccess(
+void SupervisedUserAuthenticator::OnAuthenticationSuccess(
const std::string& mount_hash,
bool add_key) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- VLOG(1) << "Locally managed user authentication success";
+ VLOG(1) << "Supervised user authentication success";
if (consumer_) {
if (add_key)
consumer_->OnAddKeySuccess();
@@ -168,17 +169,17 @@ void ManagedUserAuthenticator::OnAuthenticationSuccess(
}
}
-void ManagedUserAuthenticator::OnAuthenticationFailure(
- ManagedUserAuthenticator::AuthState state) {
+void SupervisedUserAuthenticator::OnAuthenticationFailure(
+ SupervisedUserAuthenticator::AuthState state) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- LOG(WARNING) << "Locally managed user authentication failure";
+ LOG(WARNING) << "Supervised user authentication failure";
if (consumer_)
consumer_->OnAuthenticationFailure(state);
}
-void ManagedUserAuthenticator::Resolve() {
+void SupervisedUserAuthenticator::Resolve() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- ManagedUserAuthenticator::AuthState state = ResolveState();
+ SupervisedUserAuthenticator::AuthState state = ResolveState();
VLOG(1) << "Resolved state to: " << state;
switch (state) {
case CONTINUE:
@@ -192,8 +193,9 @@ void ManagedUserAuthenticator::Resolve() {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(
- &ManagedUserAuthenticator::OnAuthenticationFailure, this, state));
+ base::Bind(&SupervisedUserAuthenticator::OnAuthenticationFailure,
+ this,
+ state));
break;
case NO_MOUNT:
// In this case, whether login succeeded or not, we can't log
@@ -202,8 +204,9 @@ void ManagedUserAuthenticator::Resolve() {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(
- &ManagedUserAuthenticator::OnAuthenticationFailure, this, state));
+ base::Bind(&SupervisedUserAuthenticator::OnAuthenticationFailure,
+ this,
+ state));
break;
case FAILED_TPM:
// In this case, we tried to create/mount cryptohome and failed
@@ -212,15 +215,16 @@ void ManagedUserAuthenticator::Resolve() {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(
- &ManagedUserAuthenticator::OnAuthenticationFailure, this, state));
+ base::Bind(&SupervisedUserAuthenticator::OnAuthenticationFailure,
+ this,
+ state));
break;
case SUCCESS:
- VLOG(2) << "Locally managed user login";
+ VLOG(2) << "Supervised user login";
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&ManagedUserAuthenticator::OnAuthenticationSuccess,
+ base::Bind(&SupervisedUserAuthenticator::OnAuthenticationSuccess,
this,
current_state_->hash(),
current_state_->add_key));
@@ -231,9 +235,10 @@ void ManagedUserAuthenticator::Resolve() {
}
}
-ManagedUserAuthenticator::~ManagedUserAuthenticator() {}
+SupervisedUserAuthenticator::~SupervisedUserAuthenticator() {}
-ManagedUserAuthenticator::AuthState ManagedUserAuthenticator::ResolveState() {
+SupervisedUserAuthenticator::AuthState
+SupervisedUserAuthenticator::ResolveState() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// If we haven't mounted the user's home dir yet, we can't be done.
// We never get past here if a cryptohome op is still pending.
@@ -255,8 +260,8 @@ ManagedUserAuthenticator::AuthState ManagedUserAuthenticator::ResolveState() {
return state;
}
-ManagedUserAuthenticator::AuthState
- ManagedUserAuthenticator::ResolveCryptohomeFailureState() {
+SupervisedUserAuthenticator::AuthState
+ SupervisedUserAuthenticator::ResolveCryptohomeFailureState() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (current_state_->cryptohome_code() ==
cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) {
@@ -274,15 +279,16 @@ ManagedUserAuthenticator::AuthState
return FAILED_MOUNT;
}
-ManagedUserAuthenticator::AuthState
- ManagedUserAuthenticator::ResolveCryptohomeSuccessState() {
+SupervisedUserAuthenticator::AuthState
+ SupervisedUserAuthenticator::ResolveCryptohomeSuccessState() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return SUCCESS;
}
-ManagedUserAuthenticator::AuthAttempt::AuthAttempt(const std::string& username,
- const std::string& password,
- bool add_key_attempt)
+SupervisedUserAuthenticator::AuthAttempt::AuthAttempt(
+ const std::string& username,
+ const std::string& password,
+ bool add_key_attempt)
: username(username),
password(password),
add_key(add_key_attempt),
@@ -291,9 +297,9 @@ ManagedUserAuthenticator::AuthAttempt::AuthAttempt(const std::string& username,
hash_obtained_(false),
cryptohome_code_(cryptohome::MOUNT_ERROR_NONE) {}
-ManagedUserAuthenticator::AuthAttempt::~AuthAttempt() {}
+SupervisedUserAuthenticator::AuthAttempt::~AuthAttempt() {}
-void ManagedUserAuthenticator::AuthAttempt::RecordCryptohomeStatus(
+void SupervisedUserAuthenticator::AuthAttempt::RecordCryptohomeStatus(
bool cryptohome_outcome,
cryptohome::MountError cryptohome_code) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -302,35 +308,35 @@ void ManagedUserAuthenticator::AuthAttempt::RecordCryptohomeStatus(
cryptohome_code_ = cryptohome_code;
}
-void ManagedUserAuthenticator::AuthAttempt::RecordHash(
+void SupervisedUserAuthenticator::AuthAttempt::RecordHash(
const std::string& hash) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
hash_obtained_ = true;
hash_ = hash;
}
-bool ManagedUserAuthenticator::AuthAttempt::cryptohome_complete() {
+bool SupervisedUserAuthenticator::AuthAttempt::cryptohome_complete() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return cryptohome_complete_;
}
-bool ManagedUserAuthenticator::AuthAttempt::cryptohome_outcome() {
+bool SupervisedUserAuthenticator::AuthAttempt::cryptohome_outcome() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return cryptohome_outcome_;
}
cryptohome::MountError
- ManagedUserAuthenticator::AuthAttempt::cryptohome_code() {
+ SupervisedUserAuthenticator::AuthAttempt::cryptohome_code() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return cryptohome_code_;
}
-bool ManagedUserAuthenticator::AuthAttempt::hash_obtained() {
+bool SupervisedUserAuthenticator::AuthAttempt::hash_obtained() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return hash_obtained_;
}
-std::string ManagedUserAuthenticator::AuthAttempt::hash() {
+std::string SupervisedUserAuthenticator::AuthAttempt::hash() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return hash_;
}
diff --git a/chrome/browser/chromeos/login/managed/managed_user_authenticator.h b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.h
index 401180f..4402946 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_authenticator.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authenticator.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_AUTHENTICATOR_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_AUTHENTICATOR_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATOR_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATOR_H_
#include <string>
@@ -15,13 +15,13 @@
namespace chromeos {
-// Authenticates locally managed users against the cryptohome.
+// Authenticates supervised users against the cryptohome.
//
// Typical flow:
// AuthenticateToMount() calls a Cryptohome to perform offline login,
// AuthenticateToCreate() calls a Cryptohome to create new cryptohome.
-class ManagedUserAuthenticator
- : public base::RefCountedThreadSafe<ManagedUserAuthenticator> {
+class SupervisedUserAuthenticator
+ : public base::RefCountedThreadSafe<SupervisedUserAuthenticator> {
public:
enum AuthState {
CONTINUE, // State indeterminate; try again when more info available.
@@ -80,7 +80,7 @@ class ManagedUserAuthenticator
virtual void OnAddKeySuccess() = 0;
};
- explicit ManagedUserAuthenticator(AuthStatusConsumer* consumer);
+ explicit SupervisedUserAuthenticator(AuthStatusConsumer* consumer);
void AuthenticateToMount(const std::string& username,
const std::string& password);
@@ -94,9 +94,9 @@ class ManagedUserAuthenticator
void Resolve();
private:
- friend class base::RefCountedThreadSafe<ManagedUserAuthenticator>;
+ friend class base::RefCountedThreadSafe<SupervisedUserAuthenticator>;
- ~ManagedUserAuthenticator();
+ ~SupervisedUserAuthenticator();
AuthState ResolveState();
AuthState ResolveCryptohomeFailureState();
@@ -107,9 +107,9 @@ class ManagedUserAuthenticator
scoped_ptr<AuthAttempt> current_state_;
AuthStatusConsumer* consumer_;
- DISALLOW_COPY_AND_ASSIGN(ManagedUserAuthenticator);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserAuthenticator);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_AUTHENTICATOR_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_AUTHENTICATOR_H_
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_constants.cc b/chrome/browser/chromeos/login/supervised/supervised_user_constants.cc
index fbfff0b..bbc6d8f 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_constants.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_constants.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_constants.h b/chrome/browser/chromeos/login/supervised/supervised_user_constants.h
index aaffbfd..644a671 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_constants.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_constants.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CONSTANTS_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CONSTANTS_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CONSTANTS_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CONSTANTS_H_
#include <string>
@@ -28,4 +28,4 @@ extern const int kCryptohomeSupervisedUserIncompleteKeyPrivileges;
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CONSTANTS_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CONSTANTS_H_
diff --git a/chrome/browser/chromeos/login/managed/managed_user_creation_browsertest.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
index 5a5096c..1217294 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_creation_browsertest.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
@@ -10,9 +10,9 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_test_base.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_test_base.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
@@ -37,34 +37,34 @@
#include "sync/protocol/sync.pb.h"
using testing::_;
-using chromeos::ManagedUserTestBase;
+using chromeos::SupervisedUserTestBase;
using chromeos::kTestSupervisedUserDisplayName;
using chromeos::kTestManager;
namespace chromeos {
-class SupervisedUserCreationTest : public ManagedUserTestBase {
+class SupervisedUserCreationTest : public SupervisedUserTestBase {
public:
- SupervisedUserCreationTest() : ManagedUserTestBase() {}
+ SupervisedUserCreationTest() : SupervisedUserTestBase() {}
private:
DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationTest);
};
-class SupervisedUserTransactionCleanupTest : public ManagedUserTestBase {
+class SupervisedUserTransactionCleanupTest : public SupervisedUserTestBase {
public:
- SupervisedUserTransactionCleanupTest() : ManagedUserTestBase() {}
+ SupervisedUserTransactionCleanupTest() : SupervisedUserTestBase() {}
private:
DISALLOW_COPY_AND_ASSIGN(SupervisedUserTransactionCleanupTest);
};
-class SupervisedUserOwnerCreationTest : public ManagedUserTestBase {
+class SupervisedUserOwnerCreationTest : public SupervisedUserTestBase {
public:
- SupervisedUserOwnerCreationTest() : ManagedUserTestBase() {}
+ SupervisedUserOwnerCreationTest() : SupervisedUserTestBase() {}
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- ManagedUserTestBase::SetUpInProcessBrowserTestFixture();
+ SupervisedUserTestBase::SetUpInProcessBrowserTestFixture();
cros_settings_provider_.reset(new StubCrosSettingsProvider());
cros_settings_provider_->Set(kDeviceOwner, base::StringValue(kTestManager));
}
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.cc
new file mode 100644
index 0000000..757189e
--- /dev/null
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h"
+
+namespace chromeos {
+
+// static
+const int SupervisedUserCreationController::kDummyAvatarIndex = -111;
+
+SupervisedUserCreationController::StatusConsumer::~StatusConsumer() {}
+
+// static
+SupervisedUserCreationController*
+ SupervisedUserCreationController::current_controller_ = NULL;
+
+SupervisedUserCreationController::SupervisedUserCreationController(
+ SupervisedUserCreationController::StatusConsumer* consumer)
+ : consumer_(consumer) {
+ DCHECK(!current_controller_) << "More than one controller exist.";
+ current_controller_ = this;
+}
+
+SupervisedUserCreationController::~SupervisedUserCreationController() {
+ current_controller_ = NULL;
+}
+
+} // namespace chromeos
+
diff --git a/chrome/browser/chromeos/login/managed/managed_user_creation_controller.h b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h
index 8faec8d..f4ce986 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_creation_controller.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_H_
#include <string>
@@ -13,16 +13,14 @@
#include "base/strings/string16.h"
#include "base/timer/timer.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_authenticator.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authenticator.h"
#include "chrome/browser/supervised_user/supervised_user_registration_utility.h"
class Profile;
namespace chromeos {
-// ManagedUserCreationController is used to locally managed user
-// creation.
-class ManagedUserCreationController {
+class SupervisedUserCreationController {
public:
// This constant is used to indicate that user does not have one of default
// avatars: either he has no chromeos avatar at all, or has an external
@@ -50,12 +48,12 @@ class ManagedUserCreationController {
// All UI initialization is deferred till Init() call.
// |Consumer| is not owned by controller, and it is expected that it wouldn't
- // be deleted before ManagedUserCreationController.
- explicit ManagedUserCreationController(StatusConsumer* consumer);
- virtual ~ManagedUserCreationController();
+ // be deleted before SupervisedUserCreationController.
+ explicit SupervisedUserCreationController(StatusConsumer* consumer);
+ virtual ~SupervisedUserCreationController();
- // Returns the current locally managed user controller if it has been created.
- static ManagedUserCreationController* current_controller() {
+ // Returns the current supervised user controller if it has been created.
+ static SupervisedUserCreationController* current_controller() {
return current_controller_;
}
@@ -92,19 +90,19 @@ class ManagedUserCreationController {
virtual Profile* GetManagerProfile() = 0;
virtual void CancelCreation() = 0;
virtual void FinishCreation() = 0;
- virtual std::string GetManagedUserId() = 0;
+ virtual std::string GetSupervisedUserId() = 0;
protected:
// Pointer to the current instance of the controller to be used by
// automation tests.
- static ManagedUserCreationController* current_controller_;
+ static SupervisedUserCreationController* current_controller_;
StatusConsumer* consumer_;
private:
- DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationController);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationController);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_H_
diff --git a/chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc
index 89e22a8..13765e1 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h"
#include "base/base64.h"
#include "base/bind.h"
@@ -15,8 +15,8 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/auth/mount_manager.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
@@ -39,8 +39,8 @@ namespace {
const int kUserCreationTimeoutSeconds = 30; // 30 seconds.
-bool StoreManagedUserFiles(const std::string& token,
- const base::FilePath& base_path) {
+bool StoreSupervisedUserFiles(const std::string& token,
+ const base::FilePath& base_path) {
if (!base::SysInfo::IsRunningOnChromeOS()) {
// If running on desktop, cryptohome stub does not create home directory.
base::CreateDirectory(base_path);
@@ -52,33 +52,35 @@ bool StoreManagedUserFiles(const std::string& token,
} // namespace
-ManagedUserCreationControllerNew::ManagedUserCreationControllerNew(
- ManagedUserCreationControllerNew::StatusConsumer* consumer,
+SupervisedUserCreationControllerNew::SupervisedUserCreationControllerNew(
+ SupervisedUserCreationControllerNew::StatusConsumer* consumer,
const std::string& manager_id)
- : ManagedUserCreationController(consumer),
+ : SupervisedUserCreationController(consumer),
stage_(STAGE_INITIAL),
weak_factory_(this) {
creation_context_.reset(
- new ManagedUserCreationControllerNew::UserCreationContext());
+ new SupervisedUserCreationControllerNew::UserCreationContext());
creation_context_->manager_id = manager_id;
}
-ManagedUserCreationControllerNew::~ManagedUserCreationControllerNew() {}
+SupervisedUserCreationControllerNew::~SupervisedUserCreationControllerNew() {}
-ManagedUserCreationControllerNew::UserCreationContext::UserCreationContext() {}
+SupervisedUserCreationControllerNew::UserCreationContext::
+ UserCreationContext() {}
-ManagedUserCreationControllerNew::UserCreationContext::~UserCreationContext() {}
+SupervisedUserCreationControllerNew::UserCreationContext::
+ ~UserCreationContext() {}
-void ManagedUserCreationControllerNew::SetManagerProfile(
+void SupervisedUserCreationControllerNew::SetManagerProfile(
Profile* manager_profile) {
creation_context_->manager_profile = manager_profile;
}
-Profile* ManagedUserCreationControllerNew::GetManagerProfile() {
+Profile* SupervisedUserCreationControllerNew::GetManagerProfile() {
return creation_context_->manager_profile;
}
-void ManagedUserCreationControllerNew::StartCreation(
+void SupervisedUserCreationControllerNew::StartCreation(
const base::string16& display_name,
const std::string& password,
int avatar_index) {
@@ -90,7 +92,7 @@ void ManagedUserCreationControllerNew::StartCreation(
StartCreationImpl();
}
-void ManagedUserCreationControllerNew::StartImport(
+void SupervisedUserCreationControllerNew::StartImport(
const base::string16& display_name,
const std::string& password,
int avatar_index,
@@ -109,7 +111,7 @@ void ManagedUserCreationControllerNew::StartImport(
StartCreationImpl();
}
-void ManagedUserCreationControllerNew::StartImport(
+void SupervisedUserCreationControllerNew::StartImport(
const base::string16& display_name,
int avatar_index,
const std::string& sync_id,
@@ -139,7 +141,7 @@ void ManagedUserCreationControllerNew::StartImport(
StartCreationImpl();
}
-void ManagedUserCreationControllerNew::StartCreationImpl() {
+void SupervisedUserCreationControllerNew::StartCreationImpl() {
DCHECK(creation_context_);
DCHECK_EQ(STAGE_INITIAL, stage_);
VLOG(1) << "Starting supervised user creation";
@@ -199,17 +201,17 @@ void ManagedUserCreationControllerNew::StartCreationImpl() {
FROM_HERE,
base::TimeDelta::FromSeconds(kUserCreationTimeoutSeconds),
this,
- &ManagedUserCreationControllerNew::CreationTimedOut);
+ &SupervisedUserCreationControllerNew::CreationTimedOut);
authenticator_ = new ExtendedAuthenticator(this);
UserContext user_context;
user_context.SetKey(Key(creation_context_->master_key));
authenticator_->TransformKeyIfNeeded(
user_context,
- base::Bind(&ManagedUserCreationControllerNew::OnKeyTransformedIfNeeded,
+ base::Bind(&SupervisedUserCreationControllerNew::OnKeyTransformedIfNeeded,
weak_factory_.GetWeakPtr()));
}
-void ManagedUserCreationControllerNew::OnKeyTransformedIfNeeded(
+void SupervisedUserCreationControllerNew::OnKeyTransformedIfNeeded(
const UserContext& user_context) {
VLOG(1) << " Phase 2.1 : Got hashed master key";
creation_context_->salted_master_key = user_context.GetKey()->GetSecret();
@@ -227,22 +229,22 @@ void ManagedUserCreationControllerNew::OnKeyTransformedIfNeeded(
authenticator_->CreateMount(
creation_context_->local_user_id,
keys,
- base::Bind(&ManagedUserCreationControllerNew::OnMountSuccess,
+ base::Bind(&SupervisedUserCreationControllerNew::OnMountSuccess,
weak_factory_.GetWeakPtr()));
}
-void ManagedUserCreationControllerNew::OnAuthenticationFailure(
+void SupervisedUserCreationControllerNew::OnAuthenticationFailure(
ExtendedAuthenticator::AuthState error) {
timeout_timer_.Stop();
ErrorCode code = NO_ERROR;
switch (error) {
- case ManagedUserAuthenticator::NO_MOUNT:
+ case SupervisedUserAuthenticator::NO_MOUNT:
code = CRYPTOHOME_NO_MOUNT;
break;
- case ManagedUserAuthenticator::FAILED_MOUNT:
+ case SupervisedUserAuthenticator::FAILED_MOUNT:
code = CRYPTOHOME_FAILED_MOUNT;
break;
- case ManagedUserAuthenticator::FAILED_TPM:
+ case SupervisedUserAuthenticator::FAILED_TPM:
code = CRYPTOHOME_FAILED_TPM;
break;
default:
@@ -253,7 +255,7 @@ void ManagedUserCreationControllerNew::OnAuthenticationFailure(
consumer_->OnCreationError(code);
}
-void ManagedUserCreationControllerNew::OnMountSuccess(
+void SupervisedUserCreationControllerNew::OnMountSuccess(
const std::string& mount_hash) {
DCHECK(creation_context_);
DCHECK_EQ(KEYS_GENERATED, stage_);
@@ -284,11 +286,11 @@ void ManagedUserCreationControllerNew::OnMountSuccess(
context,
password_key,
true,
- base::Bind(&ManagedUserCreationControllerNew::OnAddKeySuccess,
+ base::Bind(&SupervisedUserCreationControllerNew::OnAddKeySuccess,
weak_factory_.GetWeakPtr()));
}
-void ManagedUserCreationControllerNew::OnAddKeySuccess() {
+void SupervisedUserCreationControllerNew::OnAddKeySuccess() {
DCHECK(creation_context_);
DCHECK_EQ(KEYS_GENERATED, stage_);
stage_ = CRYPTOHOME_CREATED;
@@ -320,11 +322,11 @@ void ManagedUserCreationControllerNew::OnAddKeySuccess() {
creation_context_->registration_utility->Register(
creation_context_->sync_user_id,
info,
- base::Bind(&ManagedUserCreationControllerNew::RegistrationCallback,
+ base::Bind(&SupervisedUserCreationControllerNew::RegistrationCallback,
weak_factory_.GetWeakPtr()));
}
-void ManagedUserCreationControllerNew::RegistrationCallback(
+void SupervisedUserCreationControllerNew::RegistrationCallback(
const GoogleServiceAuthError& error,
const std::string& token) {
DCHECK(creation_context_);
@@ -338,20 +340,23 @@ void ManagedUserCreationControllerNew::RegistrationCallback(
PostTaskAndReplyWithResult(
content::BrowserThread::GetBlockingPool(),
FROM_HERE,
- base::Bind(&StoreManagedUserFiles,
+ base::Bind(&StoreSupervisedUserFiles,
creation_context_->token,
MountManager::GetHomeDir(creation_context_->mount_hash)),
- base::Bind(&ManagedUserCreationControllerNew::OnManagedUserFilesStored,
+ base::Bind(&SupervisedUserCreationControllerNew::
+ OnSupervisedUserFilesStored,
weak_factory_.GetWeakPtr()));
} else {
stage_ = STAGE_ERROR;
- LOG(ERROR) << "Managed user creation failed. Error code " << error.state();
+ LOG(ERROR) << "Supervised user creation failed. Error code "
+ << error.state();
if (consumer_)
consumer_->OnCreationError(CLOUD_SERVER_ERROR);
}
}
-void ManagedUserCreationControllerNew::OnManagedUserFilesStored(bool success) {
+void SupervisedUserCreationControllerNew::OnSupervisedUserFilesStored(
+ bool success) {
DCHECK(creation_context_);
DCHECK_EQ(DASHBOARD_CREATED, stage_);
@@ -379,22 +384,22 @@ void ManagedUserCreationControllerNew::OnManagedUserFilesStored(bool success) {
consumer_->OnCreationSuccess();
}
-void ManagedUserCreationControllerNew::CreationTimedOut() {
+void SupervisedUserCreationControllerNew::CreationTimedOut() {
LOG(ERROR) << "Supervised user creation timed out. stage = " << stage_;
if (consumer_)
consumer_->OnCreationTimeout();
}
-void ManagedUserCreationControllerNew::FinishCreation() {
+void SupervisedUserCreationControllerNew::FinishCreation() {
chrome::AttemptUserExit();
}
-void ManagedUserCreationControllerNew::CancelCreation() {
+void SupervisedUserCreationControllerNew::CancelCreation() {
creation_context_->registration_utility.reset();
chrome::AttemptUserExit();
}
-std::string ManagedUserCreationControllerNew::GetManagedUserId() {
+std::string SupervisedUserCreationControllerNew::GetSupervisedUserId() {
DCHECK(creation_context_);
return creation_context_->local_user_id;
}
diff --git a/chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h
index 31fc7cd..39ec157 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_NEW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_NEW_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_NEW_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_NEW_H_
#include <string>
@@ -14,7 +14,7 @@
#include "base/timer/timer.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/auth/extended_authenticator.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h"
#include "chrome/browser/supervised_user/supervised_user_registration_utility.h"
class Profile;
@@ -23,9 +23,9 @@ namespace chromeos {
class UserContext;
-// LMU Creation process:
+// Supervised user creation process:
// 0. Manager is logged in
-// 1. Generate ID for new LMU
+// 1. Generate ID for new supervised user
// 2. Start "transaction" in Local State.
// 3, Generate keys for user : master key, salt, encryption and signature keys.
// 4. Create local cryptohome (errors could arise)
@@ -33,19 +33,19 @@ class UserContext;
// 6. Store cloud token in cryptohome (actually, error could arise).
// 7. Mark "transaction" as completed.
// 8. End manager session.
-class ManagedUserCreationControllerNew
- : public ManagedUserCreationController,
+class SupervisedUserCreationControllerNew
+ : public SupervisedUserCreationController,
public ExtendedAuthenticator::NewAuthStatusConsumer {
public:
// All UI initialization is deferred till Init() call.
// |Consumer| is not owned by controller, and it is expected that it wouldn't
- // be deleted before ManagedUserCreationControllerNew.
- ManagedUserCreationControllerNew(StatusConsumer* consumer,
- const std::string& manager_id);
- virtual ~ManagedUserCreationControllerNew();
+ // be deleted before SupervisedUserCreationControllerNew.
+ SupervisedUserCreationControllerNew(StatusConsumer* consumer,
+ const std::string& manager_id);
+ virtual ~SupervisedUserCreationControllerNew();
- // Returns the current locally managed user controller if it has been created.
- static ManagedUserCreationControllerNew* current_controller() {
+ // Returns the current supervised user controller if it has been created.
+ static SupervisedUserCreationControllerNew* current_controller() {
return current_controller_;
}
@@ -85,7 +85,7 @@ class ManagedUserCreationControllerNew
virtual void CancelCreation() OVERRIDE;
virtual void FinishCreation() OVERRIDE;
- virtual std::string GetManagedUserId() OVERRIDE;
+ virtual std::string GetSupervisedUserId() OVERRIDE;
private:
enum Stage {
@@ -145,7 +145,7 @@ class ManagedUserCreationControllerNew
scoped_ptr<SupervisedUserRegistrationUtility> registration_utility;
};
- // ManagedUserAuthenticator::StatusConsumer overrides.
+ // SupervisedUserAuthenticator::StatusConsumer overrides.
virtual void OnAuthenticationFailure(ExtendedAuthenticator::AuthState error)
OVERRIDE;
@@ -162,13 +162,13 @@ class ManagedUserCreationControllerNew
void RegistrationCallback(const GoogleServiceAuthError& error,
const std::string& token);
- // Completion callback for StoreManagedUserFiles method.
+ // Completion callback for StoreSupervisedUserFiles method.
// Called on the UI thread.
- void OnManagedUserFilesStored(bool success);
+ void OnSupervisedUserFilesStored(bool success);
// Pointer to the current instance of the controller to be used by
// automation tests.
- static ManagedUserCreationControllerNew* current_controller_;
+ static SupervisedUserCreationControllerNew* current_controller_;
// Current stage of user creation.
Stage stage_;
@@ -180,14 +180,14 @@ class ManagedUserCreationControllerNew
scoped_ptr<UserCreationContext> creation_context_;
// Timer for showing warning if creation process takes too long.
- base::OneShotTimer<ManagedUserCreationControllerNew> timeout_timer_;
+ base::OneShotTimer<SupervisedUserCreationControllerNew> timeout_timer_;
// Factory of callbacks.
- base::WeakPtrFactory<ManagedUserCreationControllerNew> weak_factory_;
+ base::WeakPtrFactory<SupervisedUserCreationControllerNew> weak_factory_;
- DISALLOW_COPY_AND_ASSIGN(ManagedUserCreationControllerNew);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationControllerNew);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_CREATION_CONTROLLER_NEW_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_CONTROLLER_NEW_H_
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.cc
index a1ab2ca..8fe3603 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h"
#include "base/logging.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
@@ -15,16 +15,16 @@ namespace chromeos {
namespace {
-LocallyManagedUserCreationScreen* GetScreen(LoginDisplayHost* host) {
+SupervisedUserCreationScreen* GetScreen(LoginDisplayHost* host) {
DCHECK(host);
DCHECK(host->GetWizardController());
- DCHECK(host->GetWizardController()->GetLocallyManagedUserCreationScreen());
- return host->GetWizardController()->GetLocallyManagedUserCreationScreen();
+ DCHECK(host->GetWizardController()->GetSupervisedUserCreationScreen());
+ return host->GetWizardController()->GetSupervisedUserCreationScreen();
}
} // namespace
-LocallyManagedUserCreationFlow::LocallyManagedUserCreationFlow(
+SupervisedUserCreationFlow::SupervisedUserCreationFlow(
const std::string& manager_id)
: ExtendedUserFlow(manager_id),
token_validated_(false),
@@ -32,25 +32,25 @@ LocallyManagedUserCreationFlow::LocallyManagedUserCreationFlow(
session_started_(false),
manager_profile_(NULL) {}
-LocallyManagedUserCreationFlow::~LocallyManagedUserCreationFlow() {}
+SupervisedUserCreationFlow::~SupervisedUserCreationFlow() {}
-bool LocallyManagedUserCreationFlow::CanLockScreen() {
+bool SupervisedUserCreationFlow::CanLockScreen() {
return false;
}
-bool LocallyManagedUserCreationFlow::ShouldShowSettings() {
+bool SupervisedUserCreationFlow::ShouldShowSettings() {
return false;
}
-bool LocallyManagedUserCreationFlow::ShouldLaunchBrowser() {
+bool SupervisedUserCreationFlow::ShouldLaunchBrowser() {
return false;
}
-bool LocallyManagedUserCreationFlow::ShouldSkipPostLoginScreens() {
+bool SupervisedUserCreationFlow::ShouldSkipPostLoginScreens() {
return true;
}
-void LocallyManagedUserCreationFlow::HandleOAuthTokenStatusChange(
+void SupervisedUserCreationFlow::HandleOAuthTokenStatusChange(
User::OAuthTokenStatus status) {
if (status == User::OAUTH_TOKEN_STATUS_UNKNOWN)
return;
@@ -70,7 +70,7 @@ void LocallyManagedUserCreationFlow::HandleOAuthTokenStatusChange(
}
}
-bool LocallyManagedUserCreationFlow::HandleLoginFailure(
+bool SupervisedUserCreationFlow::HandleLoginFailure(
const AuthFailure& failure) {
if (failure.reason() == AuthFailure::COULD_NOT_MOUNT_CRYPTOHOME)
GetScreen(host())->OnManagerLoginFailure();
@@ -79,15 +79,15 @@ bool LocallyManagedUserCreationFlow::HandleLoginFailure(
return true;
}
-void LocallyManagedUserCreationFlow::HandleLoginSuccess(
+void SupervisedUserCreationFlow::HandleLoginSuccess(
const UserContext& context) {}
-bool LocallyManagedUserCreationFlow::HandlePasswordChangeDetected() {
+bool SupervisedUserCreationFlow::HandlePasswordChangeDetected() {
GetScreen(host())->ShowManagerInconsistentStateErrorScreen();
return true;
}
-void LocallyManagedUserCreationFlow::LaunchExtraSteps(
+void SupervisedUserCreationFlow::LaunchExtraSteps(
Profile* profile) {
logged_in_ = true;
manager_profile_ = profile;
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h b/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h
index f990725..3509896 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -15,11 +15,11 @@ class Profile;
namespace chromeos {
-// UserFlow implementation for creating new locally managed user.
-class LocallyManagedUserCreationFlow : public ExtendedUserFlow {
+// UserFlow implementation for creating new supervised user.
+class SupervisedUserCreationFlow : public ExtendedUserFlow {
public:
- explicit LocallyManagedUserCreationFlow(const std::string& manager_id);
- virtual ~LocallyManagedUserCreationFlow();
+ explicit SupervisedUserCreationFlow(const std::string& manager_id);
+ virtual ~SupervisedUserCreationFlow();
virtual bool CanLockScreen() OVERRIDE;
virtual bool ShouldShowSettings() OVERRIDE;
@@ -50,9 +50,9 @@ class LocallyManagedUserCreationFlow : public ExtendedUserFlow {
Profile* manager_profile_;
- DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationFlow);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationFlow);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_FLOW_H_
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc
index 91a875d..1c519d4 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/shell.h"
@@ -10,12 +10,12 @@
#include "base/values.h"
#include "chrome/browser/chromeos/camera_detector.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
#include "chrome/browser/chromeos/login/screens/screen_observer.h"
#include "chrome/browser/chromeos/login/signin_specifics.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h"
#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
@@ -83,9 +83,9 @@ void ConfigureErrorScreen(ErrorScreen* screen,
} // namespace
-LocallyManagedUserCreationScreen::LocallyManagedUserCreationScreen(
+SupervisedUserCreationScreen::SupervisedUserCreationScreen(
ScreenObserver* observer,
- LocallyManagedUserCreationScreenHandler* actor)
+ SupervisedUserCreationScreenHandler* actor)
: WizardScreen(observer),
weak_factory_(this),
actor_(actor),
@@ -100,7 +100,7 @@ LocallyManagedUserCreationScreen::LocallyManagedUserCreationScreen(
actor_->SetDelegate(this);
}
-LocallyManagedUserCreationScreen::~LocallyManagedUserCreationScreen() {
+SupervisedUserCreationScreen::~SupervisedUserCreationScreen() {
CameraPresenceNotifier::GetInstance()->RemoveObserver(this);
if (sync_service_)
sync_service_->RemoveObserver(this);
@@ -111,12 +111,12 @@ LocallyManagedUserCreationScreen::~LocallyManagedUserCreationScreen() {
NetworkPortalDetector::Get()->RemoveObserver(this);
}
-void LocallyManagedUserCreationScreen::PrepareToShow() {
+void SupervisedUserCreationScreen::PrepareToShow() {
if (actor_)
actor_->PrepareToShow();
}
-void LocallyManagedUserCreationScreen::Show() {
+void SupervisedUserCreationScreen::Show() {
CameraPresenceNotifier::GetInstance()->AddObserver(this);
if (actor_) {
actor_->Show();
@@ -133,11 +133,11 @@ void LocallyManagedUserCreationScreen::Show() {
on_error_screen_ = false;
}
-void LocallyManagedUserCreationScreen::OnPageSelected(const std::string& page) {
+void SupervisedUserCreationScreen::OnPageSelected(const std::string& page) {
last_page_ = page;
}
-void LocallyManagedUserCreationScreen::OnPortalDetectionCompleted(
+void SupervisedUserCreationScreen::OnPortalDetectionCompleted(
const NetworkState* network,
const NetworkPortalDetector::CaptivePortalState& state) {
if (state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE) {
@@ -146,13 +146,12 @@ void LocallyManagedUserCreationScreen::OnPortalDetectionCompleted(
on_error_screen_ = true;
ErrorScreen* screen = get_screen_observer()->GetErrorScreen();
ConfigureErrorScreen(screen, network, state.status);
- screen->SetUIState(ErrorScreen::UI_STATE_LOCALLY_MANAGED);
+ screen->SetUIState(ErrorScreen::UI_STATE_SUPERVISED);
get_screen_observer()->ShowErrorScreen();
}
}
-void LocallyManagedUserCreationScreen::
- ShowManagerInconsistentStateErrorScreen() {
+void SupervisedUserCreationScreen::ShowManagerInconsistentStateErrorScreen() {
if (!actor_)
return;
actor_->ShowErrorPage(
@@ -164,12 +163,12 @@ void LocallyManagedUserCreationScreen::
IDS_CREATE_LOCALLY_MANAGED_USER_MANAGER_INCONSISTENT_STATE_BUTTON));
}
-void LocallyManagedUserCreationScreen::ShowInitialScreen() {
+void SupervisedUserCreationScreen::ShowInitialScreen() {
if (actor_)
actor_->ShowIntroPage();
}
-void LocallyManagedUserCreationScreen::Hide() {
+void SupervisedUserCreationScreen::Hide() {
CameraPresenceNotifier::GetInstance()->RemoveObserver(this);
if (actor_)
actor_->Hide();
@@ -177,25 +176,25 @@ void LocallyManagedUserCreationScreen::Hide() {
NetworkPortalDetector::Get()->RemoveObserver(this);
}
-std::string LocallyManagedUserCreationScreen::GetName() const {
- return WizardController::kLocallyManagedUserCreationScreenName;
+std::string SupervisedUserCreationScreen::GetName() const {
+ return WizardController::kSupervisedUserCreationScreenName;
}
-void LocallyManagedUserCreationScreen::AbortFlow() {
+void SupervisedUserCreationScreen::AbortFlow() {
controller_->CancelCreation();
}
-void LocallyManagedUserCreationScreen::FinishFlow() {
+void SupervisedUserCreationScreen::FinishFlow() {
controller_->FinishCreation();
}
-void LocallyManagedUserCreationScreen::AuthenticateManager(
+void SupervisedUserCreationScreen::AuthenticateManager(
const std::string& manager_id,
const std::string& manager_password) {
// Make sure no two controllers exist at the same time.
controller_.reset();
- controller_.reset(new ManagedUserCreationControllerNew(this, manager_id));
+ controller_.reset(new SupervisedUserCreationControllerNew(this, manager_id));
UserContext user_context(manager_id);
user_context.SetKey(Key(manager_password));
@@ -203,20 +202,20 @@ void LocallyManagedUserCreationScreen::AuthenticateManager(
SigninSpecifics());
}
-void LocallyManagedUserCreationScreen::CreateManagedUser(
+void SupervisedUserCreationScreen::CreateSupervisedUser(
const base::string16& display_name,
- const std::string& managed_user_password) {
+ const std::string& supervised_user_password) {
DCHECK(controller_.get());
int image;
if (selected_image_ == User::kExternalImageIndex)
// TODO(dzhioev): crbug/249660
- image = ManagedUserCreationController::kDummyAvatarIndex;
+ image = SupervisedUserCreationController::kDummyAvatarIndex;
else
image = selected_image_;
- controller_->StartCreation(display_name, managed_user_password, image);
+ controller_->StartCreation(display_name, supervised_user_password, image);
}
-void LocallyManagedUserCreationScreen::ImportManagedUser(
+void SupervisedUserCreationScreen::ImportSupervisedUser(
const std::string& user_id) {
DCHECK(controller_.get());
DCHECK(existing_users_.get());
@@ -232,7 +231,7 @@ void LocallyManagedUserCreationScreen::ImportManagedUser(
std::string encryption_key;
std::string avatar;
bool exists;
- int avatar_index = ManagedUserCreationController::kDummyAvatarIndex;
+ int avatar_index = SupervisedUserCreationController::kDummyAvatarIndex;
user_info->GetString(SupervisedUserSyncService::kName, &display_name);
user_info->GetString(SupervisedUserSyncService::kMasterKey, &master_key);
user_info->GetString(SupervisedUserSyncService::kPasswordSignatureKey,
@@ -281,7 +280,7 @@ void LocallyManagedUserCreationScreen::ImportManagedUser(
// TODO(antrim): Code duplication with previous method will be removed once
// password sync is implemented.
-void LocallyManagedUserCreationScreen::ImportManagedUserWithPassword(
+void SupervisedUserCreationScreen::ImportSupervisedUserWithPassword(
const std::string& user_id,
const std::string& password) {
DCHECK(controller_.get());
@@ -296,7 +295,7 @@ void LocallyManagedUserCreationScreen::ImportManagedUserWithPassword(
std::string master_key;
std::string avatar;
bool exists;
- int avatar_index = ManagedUserCreationController::kDummyAvatarIndex;
+ int avatar_index = SupervisedUserCreationController::kDummyAvatarIndex;
user_info->GetString(SupervisedUserSyncService::kName, &display_name);
user_info->GetString(SupervisedUserSyncService::kMasterKey, &master_key);
user_info->GetString(SupervisedUserSyncService::kChromeOsAvatar, &avatar);
@@ -323,12 +322,12 @@ void LocallyManagedUserCreationScreen::ImportManagedUserWithPassword(
master_key);
}
-void LocallyManagedUserCreationScreen::OnManagerLoginFailure() {
+void SupervisedUserCreationScreen::OnManagerLoginFailure() {
if (actor_)
actor_->ShowManagerPasswordError();
}
-void LocallyManagedUserCreationScreen::OnManagerFullyAuthenticated(
+void SupervisedUserCreationScreen::OnManagerFullyAuthenticated(
Profile* manager_profile) {
DCHECK(controller_.get());
// For manager user, move desktop to locked container so that windows created
@@ -348,37 +347,37 @@ void LocallyManagedUserCreationScreen::OnManagerFullyAuthenticated(
OnSupervisedUsersChanged();
}
-void LocallyManagedUserCreationScreen::OnSupervisedUsersChanged() {
+void SupervisedUserCreationScreen::OnSupervisedUsersChanged() {
CHECK(sync_service_);
sync_service_->GetSupervisedUsersAsync(
- base::Bind(&LocallyManagedUserCreationScreen::OnGetManagedUsers,
+ base::Bind(&SupervisedUserCreationScreen::OnGetSupervisedUsers,
weak_factory_.GetWeakPtr()));
}
-void LocallyManagedUserCreationScreen::OnManagerCryptohomeAuthenticated() {
+void SupervisedUserCreationScreen::OnManagerCryptohomeAuthenticated() {
if (actor_) {
actor_->ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
- IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_AUTH_PROGRESS_MESSAGE));
+ IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_AUTH_PROGRESS_MESSAGE));
}
}
-void LocallyManagedUserCreationScreen::OnActorDestroyed(
- LocallyManagedUserCreationScreenHandler* actor) {
+void SupervisedUserCreationScreen::OnActorDestroyed(
+ SupervisedUserCreationScreenHandler* actor) {
if (actor_ == actor)
actor_ = NULL;
}
-void LocallyManagedUserCreationScreen::OnCreationError(
- ManagedUserCreationController::ErrorCode code) {
+void SupervisedUserCreationScreen::OnCreationError(
+ SupervisedUserCreationController::ErrorCode code) {
base::string16 title;
base::string16 message;
base::string16 button;
// TODO(antrim) : find out which errors do we really have.
// We might reuse some error messages from ordinary user flow.
switch (code) {
- case ManagedUserCreationController::CRYPTOHOME_NO_MOUNT:
- case ManagedUserCreationController::CRYPTOHOME_FAILED_MOUNT:
- case ManagedUserCreationController::CRYPTOHOME_FAILED_TPM:
+ case SupervisedUserCreationController::CRYPTOHOME_NO_MOUNT:
+ case SupervisedUserCreationController::CRYPTOHOME_FAILED_MOUNT:
+ case SupervisedUserCreationController::CRYPTOHOME_FAILED_TPM:
title = l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_TPM_ERROR_TITLE);
message = l10n_util::GetStringUTF16(
@@ -386,8 +385,8 @@ void LocallyManagedUserCreationScreen::OnCreationError(
button = l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_TPM_ERROR_BUTTON);
break;
- case ManagedUserCreationController::CLOUD_SERVER_ERROR:
- case ManagedUserCreationController::TOKEN_WRITE_FAILED:
+ case SupervisedUserCreationController::CLOUD_SERVER_ERROR:
+ case SupervisedUserCreationController::TOKEN_WRITE_FAILED:
title = l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_GENERIC_ERROR_TITLE);
message = l10n_util::GetStringUTF16(
@@ -395,28 +394,28 @@ void LocallyManagedUserCreationScreen::OnCreationError(
button = l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_GENERIC_ERROR_BUTTON);
break;
- case ManagedUserCreationController::NO_ERROR:
+ case SupervisedUserCreationController::NO_ERROR:
NOTREACHED();
}
if (actor_)
actor_->ShowErrorPage(title, message, button);
}
-void LocallyManagedUserCreationScreen::OnCreationTimeout() {
+void SupervisedUserCreationScreen::OnCreationTimeout() {
if (actor_) {
actor_->ShowStatusMessage(false /* error */, l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_TIMEOUT_MESSAGE));
}
}
-void LocallyManagedUserCreationScreen::OnLongCreationWarning() {
+void SupervisedUserCreationScreen::OnLongCreationWarning() {
if (actor_) {
actor_->ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_PROFILES_CREATE_SUPERVISED_JUST_SIGNED_IN));
}
}
-bool LocallyManagedUserCreationScreen::FindUserByDisplayName(
+bool SupervisedUserCreationScreen::FindUserByDisplayName(
const base::string16& display_name,
std::string *out_id) const {
if (!existing_users_.get())
@@ -441,8 +440,8 @@ bool LocallyManagedUserCreationScreen::FindUserByDisplayName(
// TODO(antrim) : this is an explicit code duplications with UserImageScreen.
// It should be removed by issue 251179.
-void LocallyManagedUserCreationScreen::ApplyPicture() {
- std::string user_id = controller_->GetManagedUserId();
+void SupervisedUserCreationScreen::ApplyPicture() {
+ std::string user_id = controller_->GetSupervisedUserId();
UserManager* user_manager = UserManager::Get();
UserImageManager* image_manager = user_manager->GetUserImageManager(user_id);
switch (selected_image_) {
@@ -467,17 +466,17 @@ void LocallyManagedUserCreationScreen::ApplyPicture() {
actor_->ShowTutorialPage();
}
-void LocallyManagedUserCreationScreen::OnCreationSuccess() {
+void SupervisedUserCreationScreen::OnCreationSuccess() {
ApplyPicture();
}
-void LocallyManagedUserCreationScreen::OnCameraPresenceCheckDone(
+void SupervisedUserCreationScreen::OnCameraPresenceCheckDone(
bool is_camera_present) {
if (actor_)
actor_->SetCameraPresent(is_camera_present);
}
-void LocallyManagedUserCreationScreen::OnGetManagedUsers(
+void SupervisedUserCreationScreen::OnGetSupervisedUsers(
const base::DictionaryValue* users) {
// Copy for passing to WebUI, contains only id, name and avatar URL.
scoped_ptr<base::ListValue> ui_users(new base::ListValue());
@@ -496,7 +495,7 @@ void LocallyManagedUserCreationScreen::OnGetManagedUsers(
base::DictionaryValue* ui_copy =
static_cast<base::DictionaryValue*>(new base::DictionaryValue());
- int avatar_index = ManagedUserCreationController::kDummyAvatarIndex;
+ int avatar_index = SupervisedUserCreationController::kDummyAvatarIndex;
std::string chromeos_avatar;
if (local_copy->GetString(SupervisedUserSyncService::kChromeOsAvatar,
&chromeos_avatar) &&
@@ -544,10 +543,10 @@ void LocallyManagedUserCreationScreen::OnGetManagedUsers(
existing_users_->Set(it.key(), local_copy);
ui_users->Append(ui_copy);
}
- actor_->ShowExistingManagedUsers(ui_users.get());
+ actor_->ShowExistingSupervisedUsers(ui_users.get());
}
-void LocallyManagedUserCreationScreen::OnPhotoTaken(
+void SupervisedUserCreationScreen::OnPhotoTaken(
const std::string& raw_data) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
user_photo_ = gfx::ImageSkia();
@@ -561,7 +560,7 @@ void LocallyManagedUserCreationScreen::OnPhotoTaken(
image_decoder_->Start(task_runner);
}
-void LocallyManagedUserCreationScreen::OnImageDecoded(
+void SupervisedUserCreationScreen::OnImageDecoded(
const ImageDecoder* decoder,
const SkBitmap& decoded_image) {
DCHECK_EQ(image_decoder_.get(), decoder);
@@ -570,12 +569,12 @@ void LocallyManagedUserCreationScreen::OnImageDecoded(
ApplyPicture();
}
-void LocallyManagedUserCreationScreen::OnDecodeImageFailed(
+void SupervisedUserCreationScreen::OnDecodeImageFailed(
const ImageDecoder* decoder) {
NOTREACHED() << "Failed to decode PNG image from WebUI";
}
-void LocallyManagedUserCreationScreen::OnImageSelected(
+void SupervisedUserCreationScreen::OnImageSelected(
const std::string& image_type,
const std::string& image_url) {
if (image_url.empty())
@@ -591,7 +590,7 @@ void LocallyManagedUserCreationScreen::OnImageSelected(
}
}
-void LocallyManagedUserCreationScreen::OnImageAccepted() {
+void SupervisedUserCreationScreen::OnImageAccepted() {
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h
index 9c11cb8..41f3498 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h
@@ -1,20 +1,20 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCREEN_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCREEN_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN_H_
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/chromeos/camera_presence_notifier.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_creation_controller.h"
#include "chrome/browser/chromeos/login/screens/wizard_screen.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h"
#include "chrome/browser/image_decoder.h"
#include "chrome/browser/supervised_user/supervised_user_sync_service.h"
-#include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h"
#include "chromeos/network/portal_detector/network_portal_detector.h"
#include "ui/gfx/image/image_skia.h"
@@ -24,20 +24,20 @@ namespace chromeos {
class NetworkState;
-// Class that controls screen showing ui for locally managed user creation.
-class LocallyManagedUserCreationScreen
+// Class that controls screen showing ui for supervised user creation.
+class SupervisedUserCreationScreen
: public WizardScreen,
- public LocallyManagedUserCreationScreenHandler::Delegate,
- public ManagedUserCreationController::StatusConsumer,
+ public SupervisedUserCreationScreenHandler::Delegate,
+ public SupervisedUserCreationController::StatusConsumer,
public SupervisedUserSyncServiceObserver,
public ImageDecoder::Delegate,
public NetworkPortalDetector::Observer,
public CameraPresenceNotifier::Observer {
public:
- LocallyManagedUserCreationScreen(
+ SupervisedUserCreationScreen(
ScreenObserver* observer,
- LocallyManagedUserCreationScreenHandler* actor);
- virtual ~LocallyManagedUserCreationScreen();
+ SupervisedUserCreationScreenHandler* actor);
+ virtual ~SupervisedUserCreationScreen();
// Makes screen to show message about inconsistency in manager login flow
// (e.g. password change detected, invalid OAuth token, etc).
@@ -77,14 +77,14 @@ class LocallyManagedUserCreationScreen
virtual void Hide() OVERRIDE;
virtual std::string GetName() const OVERRIDE;
- // LocallyManagedUserCreationScreenHandler::Delegate implementation:
- virtual void OnActorDestroyed(LocallyManagedUserCreationScreenHandler* actor)
+ // SupervisedUserCreationScreenHandler::Delegate implementation:
+ virtual void OnActorDestroyed(SupervisedUserCreationScreenHandler* actor)
OVERRIDE;
- virtual void CreateManagedUser(
+ virtual void CreateSupervisedUser(
const base::string16& display_name,
- const std::string& managed_user_password) OVERRIDE;
- virtual void ImportManagedUser(const std::string& user_id) OVERRIDE;
- virtual void ImportManagedUserWithPassword(
+ const std::string& supervised_user_password) OVERRIDE;
+ virtual void ImportSupervisedUser(const std::string& user_id) OVERRIDE;
+ virtual void ImportSupervisedUserWithPassword(
const std::string& user_id,
const std::string& password) OVERRIDE;
virtual void AuthenticateManager(
@@ -96,8 +96,8 @@ class LocallyManagedUserCreationScreen
std::string *out_id) const OVERRIDE;
virtual void OnPageSelected(const std::string& page) OVERRIDE;
- // LocallyManagedUserController::StatusConsumer overrides.
- virtual void OnCreationError(ManagedUserCreationController::ErrorCode code)
+ // SupervisedUserController::StatusConsumer overrides.
+ virtual void OnCreationError(SupervisedUserCreationController::ErrorCode code)
OVERRIDE;
virtual void OnCreationTimeout() OVERRIDE;
virtual void OnCreationSuccess() OVERRIDE;
@@ -111,7 +111,7 @@ class LocallyManagedUserCreationScreen
// TODO(antrim) : this is an explicit code duplications with UserImageScreen.
// It should be removed by issue 251179.
- // LocallyManagedUserCreationScreenHandler::Delegate (image) implementation:
+ // SupervisedUserCreationScreenHandler::Delegate (image) implementation:
virtual void OnPhotoTaken(const std::string& raw_data) OVERRIDE;
virtual void OnImageSelected(const std::string& image_url,
const std::string& image_type) OVERRIDE;
@@ -123,12 +123,12 @@ class LocallyManagedUserCreationScreen
private:
void ApplyPicture();
- void OnGetManagedUsers(const base::DictionaryValue* users);
+ void OnGetSupervisedUsers(const base::DictionaryValue* users);
- base::WeakPtrFactory<LocallyManagedUserCreationScreen> weak_factory_;
- LocallyManagedUserCreationScreenHandler* actor_;
+ base::WeakPtrFactory<SupervisedUserCreationScreen> weak_factory_;
+ SupervisedUserCreationScreenHandler* actor_;
- scoped_ptr<ManagedUserCreationController> controller_;
+ scoped_ptr<SupervisedUserCreationController> controller_;
scoped_ptr<base::DictionaryValue> existing_users_;
bool on_error_screen_;
@@ -141,10 +141,10 @@ class LocallyManagedUserCreationScreen
bool apply_photo_after_decoding_;
int selected_image_;
- DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreen);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationScreen);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_SCREEN_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_CREATION_SCREEN_H_
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_login_flow.cc b/chrome/browser/chromeos/login/supervised/supervised_user_login_flow.cc
index 0e3dd8e..0d68aac 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_login_flow.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_login_flow.cc
@@ -1,8 +1,8 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h"
#include "base/base64.h"
#include "base/logging.h"
@@ -11,9 +11,9 @@
#include "base/prefs/pref_service.h"
#include "base/values.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
diff --git a/chrome/browser/chromeos/login/managed/supervised_user_login_flow.h b/chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h
index c9e5612..0d7ddff5 100644
--- a/chrome/browser/chromeos/login/managed/supervised_user_login_flow.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h
@@ -1,9 +1,9 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_LOGIN_FLOW_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_LOGIN_FLOW_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_LOGIN_FLOW_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_LOGIN_FLOW_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -15,7 +15,7 @@
namespace chromeos {
-// UserFlow implementation for signing in locally managed user.
+// UserFlow implementation for signing in supervised user.
class SupervisedUserLoginFlow
: public ExtendedUserFlow,
public ExtendedAuthenticator::NewAuthStatusConsumer {
@@ -62,4 +62,4 @@ class SupervisedUserLoginFlow
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_SUPERVISED_USER_LOGIN_FLOW_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_LOGIN_FLOW_H_
diff --git a/chrome/browser/chromeos/login/managed/managed_user_password_browsertest.cc b/chrome/browser/chromeos/login/supervised/supervised_user_password_browsertest.cc
index 161c991..670960e 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_password_browsertest.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_password_browsertest.cc
@@ -10,9 +10,9 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
-#include "chrome/browser/chromeos/login/managed/managed_user_test_base.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_test_base.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
@@ -37,23 +37,23 @@
#include "sync/protocol/sync.pb.h"
using testing::_;
-using chromeos::ManagedUserTestBase;
+using chromeos::SupervisedUserTestBase;
using chromeos::kTestSupervisedUserDisplayName;
using chromeos::kTestManager;
namespace chromeos {
-class SupervisedUserPasswordTest : public ManagedUserTestBase {
+class SupervisedUserPasswordTest : public SupervisedUserTestBase {
public:
- SupervisedUserPasswordTest() : ManagedUserTestBase() {}
+ SupervisedUserPasswordTest() : SupervisedUserTestBase() {}
private:
DISALLOW_COPY_AND_ASSIGN(SupervisedUserPasswordTest);
};
-class SupervisedUserPasswordManagerTest : public ManagedUserTestBase {
+class SupervisedUserPasswordManagerTest : public SupervisedUserTestBase {
public:
- SupervisedUserPasswordManagerTest() : ManagedUserTestBase() {}
+ SupervisedUserPasswordManagerTest() : SupervisedUserTestBase() {}
private:
DISALLOW_COPY_AND_ASSIGN(SupervisedUserPasswordManagerTest);
@@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
// update, and performs migration.
IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
DISABLED_PRE_PasswordChangeFromManagerTest) {
- const User* managed_user = UserManager::Get()->GetUsers().at(0);
+ const User* supervised_user = UserManager::Get()->GetUsers().at(0);
SigninAsManager(1);
@@ -131,7 +131,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
std::string sync_id =
UserManager::Get()->GetSupervisedUserManager()->GetUserSyncId(
- managed_user->email());
+ supervised_user->email());
::sync_pb::ManagedUserSpecifics managed_user_proto;
@@ -142,7 +142,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
managed_user_proto.set_password_signature_key("signature_key");
managed_user_proto.set_password_encryption_key("encryption_key");
- managed_users_adapter_->AddChange(managed_user_proto, false);
+ supervised_users_adapter_->AddChange(managed_user_proto, false);
content::RunAllPendingInMessageLoop();
base::DictionaryValue password;
@@ -211,7 +211,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
// performs the migration.
IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
DISABLED_PRE_PasswordChangeUserAndManagerTest) {
- const User* managed_user = UserManager::Get()->GetUsers().at(0);
+ const User* supervised_user = UserManager::Get()->GetUsers().at(0);
SigninAsManager(1);
@@ -219,7 +219,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
std::string sync_id =
UserManager::Get()->GetSupervisedUserManager()->GetUserSyncId(
- managed_user->email());
+ supervised_user->email());
::sync_pb::ManagedUserSpecifics managed_user_proto;
@@ -230,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserPasswordTest,
managed_user_proto.set_password_signature_key("signature_key");
managed_user_proto.set_password_encryption_key("encryption_key");
- managed_users_adapter_->AddChange(managed_user_proto, false);
+ supervised_users_adapter_->AddChange(managed_user_proto, false);
content::RunAllPendingInMessageLoop();
base::DictionaryValue password;
diff --git a/chrome/browser/chromeos/login/managed/managed_user_test_base.cc b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc
index 6995ec9..b61de97 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_test_base.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/login/managed/managed_user_test_base.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_test_base.h"
#include <string>
@@ -14,8 +14,8 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
@@ -56,7 +56,7 @@ const char kStubEthernetGuid[] = "eth0";
}
-ManagedUsersSyncTestAdapter::ManagedUsersSyncTestAdapter(Profile* profile)
+SupervisedUsersSyncTestAdapter::SupervisedUsersSyncTestAdapter(Profile* profile)
: processor_(), next_sync_data_id_(0) {
service_ = SupervisedUserSyncServiceFactory::GetForProfile(profile);
processor_ = new syncer::FakeSyncChangeProcessor();
@@ -68,7 +68,7 @@ ManagedUsersSyncTestAdapter::ManagedUsersSyncTestAdapter(Profile* profile)
}
scoped_ptr< ::sync_pb::ManagedUserSpecifics>
-ManagedUsersSyncTestAdapter::GetFirstChange() {
+SupervisedUsersSyncTestAdapter::GetFirstChange() {
scoped_ptr< ::sync_pb::ManagedUserSpecifics> result(
new ::sync_pb::ManagedUserSpecifics);
CHECK(HasChanges())
@@ -79,7 +79,7 @@ ManagedUsersSyncTestAdapter::GetFirstChange() {
return result.Pass();
}
-void ManagedUsersSyncTestAdapter::AddChange(
+void SupervisedUsersSyncTestAdapter::AddChange(
const ::sync_pb::ManagedUserSpecifics& proto,
bool update) {
sync_pb::EntitySpecifics specifics;
@@ -103,8 +103,8 @@ void ManagedUsersSyncTestAdapter::AddChange(
service_->ProcessSyncChanges(FROM_HERE, change_list);
}
-ManagedUsersSharedSettingsSyncTestAdapter::
- ManagedUsersSharedSettingsSyncTestAdapter(Profile* profile)
+SupervisedUsersSharedSettingsSyncTestAdapter::
+ SupervisedUsersSharedSettingsSyncTestAdapter(Profile* profile)
: processor_(), next_sync_data_id_(0) {
service_ =
SupervisedUserSharedSettingsServiceFactory::GetForBrowserContext(profile);
@@ -117,7 +117,7 @@ ManagedUsersSharedSettingsSyncTestAdapter::
}
scoped_ptr< ::sync_pb::ManagedUserSharedSettingSpecifics>
-ManagedUsersSharedSettingsSyncTestAdapter::GetFirstChange() {
+SupervisedUsersSharedSettingsSyncTestAdapter::GetFirstChange() {
scoped_ptr< ::sync_pb::ManagedUserSharedSettingSpecifics> result(
new ::sync_pb::ManagedUserSharedSettingSpecifics);
CHECK(HasChanges())
@@ -128,7 +128,7 @@ ManagedUsersSharedSettingsSyncTestAdapter::GetFirstChange() {
return result.Pass();
}
-void ManagedUsersSharedSettingsSyncTestAdapter::AddChange(
+void SupervisedUsersSharedSettingsSyncTestAdapter::AddChange(
const ::sync_pb::ManagedUserSharedSettingSpecifics& proto,
bool update) {
sync_pb::EntitySpecifics specifics;
@@ -152,7 +152,7 @@ void ManagedUsersSharedSettingsSyncTestAdapter::AddChange(
service_->ProcessSyncChanges(FROM_HERE, change_list);
}
-void ManagedUsersSharedSettingsSyncTestAdapter::AddChange(
+void SupervisedUsersSharedSettingsSyncTestAdapter::AddChange(
const std::string& mu_id,
const std::string& key,
const base::Value& value,
@@ -164,7 +164,7 @@ void ManagedUsersSharedSettingsSyncTestAdapter::AddChange(
AddChange(data.GetSpecifics().managed_user_shared_setting(), update);
}
-ManagedUserTestBase::ManagedUserTestBase()
+SupervisedUserTestBase::SupervisedUserTestBase()
: LoginManagerTest(true),
mock_async_method_caller_(NULL),
mock_homedir_methods_(NULL),
@@ -172,10 +172,10 @@ ManagedUserTestBase::ManagedUserTestBase()
registration_utility_stub_(NULL) {
}
-ManagedUserTestBase::~ManagedUserTestBase() {
+SupervisedUserTestBase::~SupervisedUserTestBase() {
}
-void ManagedUserTestBase::SetUpInProcessBrowserTestFixture() {
+void SupervisedUserTestBase::SetUpInProcessBrowserTestFixture() {
LoginManagerTest::SetUpInProcessBrowserTestFixture();
mock_async_method_caller_ = new cryptohome::MockAsyncMethodCaller;
mock_async_method_caller_->SetUp(true, cryptohome::MOUNT_ERROR_NONE);
@@ -203,11 +203,11 @@ void ManagedUserTestBase::SetUpInProcessBrowserTestFixture() {
online_state);
}
-void ManagedUserTestBase::CleanUpOnMainThread() {
+void SupervisedUserTestBase::CleanUpOnMainThread() {
LoginManagerTest::CleanUpOnMainThread();
}
-void ManagedUserTestBase::TearDown() {
+void SupervisedUserTestBase::TearDown() {
cryptohome::AsyncMethodCaller::Shutdown();
cryptohome::HomedirMethods::Shutdown();
mock_homedir_methods_ = NULL;
@@ -215,15 +215,15 @@ void ManagedUserTestBase::TearDown() {
LoginManagerTest::TearDown();
}
-void ManagedUserTestBase::TearDownInProcessBrowserTestFixture() {
+void SupervisedUserTestBase::TearDownInProcessBrowserTestFixture() {
NetworkPortalDetector::Shutdown();
}
-void ManagedUserTestBase::JSEval(const std::string& script) {
+void SupervisedUserTestBase::JSEval(const std::string& script) {
EXPECT_TRUE(content::ExecuteScript(web_contents(), script)) << script;
}
-void ManagedUserTestBase::JSExpectAsync(const std::string& function) {
+void SupervisedUserTestBase::JSExpectAsync(const std::string& function) {
bool result;
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
web_contents(),
@@ -234,7 +234,7 @@ void ManagedUserTestBase::JSExpectAsync(const std::string& function) {
EXPECT_TRUE(result);
}
-void ManagedUserTestBase::JSSetTextField(const std::string& element_selector,
+void SupervisedUserTestBase::JSSetTextField(const std::string& element_selector,
const std::string& value) {
std::string function =
StringPrintf("document.querySelector('%s').value = '%s'",
@@ -243,13 +243,13 @@ void ManagedUserTestBase::JSSetTextField(const std::string& element_selector,
JSEval(function);
}
-void ManagedUserTestBase::PrepareUsers() {
+void SupervisedUserTestBase::PrepareUsers() {
RegisterUser(kTestManager);
RegisterUser(kTestOtherUser);
chromeos::StartupUtils::MarkOobeCompleted();
}
-void ManagedUserTestBase::StartFlowLoginAsManager() {
+void SupervisedUserTestBase::StartFlowLoginAsManager() {
// Navigate to supervised user creation screen.
JSEval("chrome.send('showLocallyManagedUserCreationScreen')");
@@ -312,7 +312,7 @@ void ManagedUserTestBase::StartFlowLoginAsManager() {
JSExpect(StringPrintf("%s == 'username'", kCurrentPage));
}
-void ManagedUserTestBase::FillNewUserData(const std::string& display_name) {
+void SupervisedUserTestBase::FillNewUserData(const std::string& display_name) {
JSExpect("$('managed-user-creation-next-button').disabled");
JSSetTextField("#managed-user-creation-name", display_name);
JSEval("$('managed-user-creation').checkUserName_()");
@@ -328,7 +328,7 @@ void ManagedUserTestBase::FillNewUserData(const std::string& display_name) {
JSExpect("!$('managed-user-creation-next-button').disabled");
}
-void ManagedUserTestBase::StartUserCreation(
+void SupervisedUserTestBase::StartUserCreation(
const std::string& button_id,
const std::string& expected_display_name) {
EXPECT_CALL(*mock_homedir_methods_, MountEx(_, _, _, _)).Times(1);
@@ -353,7 +353,7 @@ void ManagedUserTestBase::StartUserCreation(
JSEval("$('managed-user-creation-gotit-button').click()");
}
-void ManagedUserTestBase::SigninAsSupervisedUser(
+void SupervisedUserTestBase::SigninAsSupervisedUser(
bool check_homedir_calls,
int user_index,
const std::string& expected_display_name) {
@@ -371,14 +371,14 @@ void ManagedUserTestBase::SigninAsSupervisedUser(
::testing::Mock::VerifyAndClearExpectations(mock_homedir_methods_);
Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
shared_settings_adapter_.reset(
- new ManagedUsersSharedSettingsSyncTestAdapter(profile));
+ new SupervisedUsersSharedSettingsSyncTestAdapter(profile));
// Check ChromeOS preference is initialized.
EXPECT_TRUE(
static_cast<ProfileImpl*>(profile)->chromeos_preferences_);
}
-void ManagedUserTestBase::SigninAsManager(int user_index) {
+void SupervisedUserTestBase::SigninAsManager(int user_index) {
// Log in as supervised user, make sure that everything works.
ASSERT_EQ(3UL, UserManager::Get()->GetUsers().size());
@@ -387,11 +387,11 @@ void ManagedUserTestBase::SigninAsManager(int user_index) {
LoginUser(user->email());
Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
shared_settings_adapter_.reset(
- new ManagedUsersSharedSettingsSyncTestAdapter(profile));
- managed_users_adapter_.reset(new ManagedUsersSyncTestAdapter(profile));
+ new SupervisedUsersSharedSettingsSyncTestAdapter(profile));
+ supervised_users_adapter_.reset(new SupervisedUsersSyncTestAdapter(profile));
}
-void ManagedUserTestBase::RemoveSupervisedUser(
+void SupervisedUserTestBase::RemoveSupervisedUser(
unsigned long original_user_count,
int user_index,
const std::string& expected_display_name) {
diff --git a/chrome/browser/chromeos/login/managed/managed_user_test_base.h b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.h
index 9e2437f..ff5d5ff 100644
--- a/chrome/browser/chromeos/login/managed/managed_user_test_base.h
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.h
@@ -1,8 +1,8 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
#include <string>
@@ -27,9 +27,9 @@ const char kTestManagerPassword[] = "password";
const char kTestSupervisedUserDisplayName[] = "John Doe";
const char kTestSupervisedUserPassword[] = "simplepassword";
-class ManagedUsersSyncTestAdapter {
+class SupervisedUsersSyncTestAdapter {
public:
- explicit ManagedUsersSyncTestAdapter(Profile* profile);
+ explicit SupervisedUsersSyncTestAdapter(Profile* profile);
bool HasChanges() { return !processor_->changes().empty(); }
@@ -42,9 +42,9 @@ class ManagedUsersSyncTestAdapter {
int next_sync_data_id_;
};
-class ManagedUsersSharedSettingsSyncTestAdapter {
+class SupervisedUsersSharedSettingsSyncTestAdapter {
public:
- explicit ManagedUsersSharedSettingsSyncTestAdapter(Profile* profile);
+ explicit SupervisedUsersSharedSettingsSyncTestAdapter(Profile* profile);
bool HasChanges() { return !processor_->changes().empty(); }
@@ -64,10 +64,10 @@ class ManagedUsersSharedSettingsSyncTestAdapter {
int next_sync_data_id_;
};
-class ManagedUserTestBase : public chromeos::LoginManagerTest {
+class SupervisedUserTestBase : public chromeos::LoginManagerTest {
public:
- ManagedUserTestBase();
- virtual ~ManagedUserTestBase();
+ SupervisedUserTestBase();
+ virtual ~SupervisedUserTestBase();
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
virtual void CleanUpOnMainThread() OVERRIDE;
@@ -102,14 +102,14 @@ class ManagedUserTestBase : public chromeos::LoginManagerTest {
NetworkPortalDetectorTestImpl* network_portal_detector_;
SupervisedUserRegistrationUtilityStub* registration_utility_stub_;
scoped_ptr<ScopedTestingSupervisedUserRegistrationUtility> scoped_utility_;
- scoped_ptr<ManagedUsersSharedSettingsSyncTestAdapter>
+ scoped_ptr<SupervisedUsersSharedSettingsSyncTestAdapter>
shared_settings_adapter_;
- scoped_ptr<ManagedUsersSyncTestAdapter> managed_users_adapter_;
+ scoped_ptr<SupervisedUsersSyncTestAdapter> supervised_users_adapter_;
private:
- DISALLOW_COPY_AND_ASSIGN(ManagedUserTestBase);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserTestBase);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_MANAGED_USER_TEST_BASE_H_
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
diff --git a/chrome/browser/chromeos/login/ui/oobe_display.h b/chrome/browser/chromeos/login/ui/oobe_display.h
index ea7cafa..6015542 100644
--- a/chrome/browser/chromeos/login/ui/oobe_display.h
+++ b/chrome/browser/chromeos/login/ui/oobe_display.h
@@ -23,9 +23,9 @@ class HIDDetectionScreenActor;
class HostPairingScreenActor;
class KioskAutolaunchScreenActor;
class KioskEnableScreenActor;
-class LocallyManagedUserCreationScreenHandler;
class NetworkScreenActor;
class ResetScreenActor;
+class SupervisedUserCreationScreenHandler;
class TermsOfServiceScreenActor;
class UpdateScreenActor;
class UserImageScreenActor;
@@ -50,8 +50,8 @@ class OobeDisplay {
SCREEN_USER_IMAGE_PICKER,
SCREEN_TPM_ERROR,
SCREEN_PASSWORD_CHANGED,
- SCREEN_CREATE_MANAGED_USER_DIALOG,
- SCREEN_CREATE_MANAGED_USER_FLOW,
+ SCREEN_CREATE_SUPERVISED_USER_DIALOG,
+ SCREEN_CREATE_SUPERVISED_USER_FLOW,
SCREEN_TERMS_OF_SERVICE,
SCREEN_WRONG_HWID,
SCREEN_AUTO_ENROLLMENT_CHECK,
@@ -82,8 +82,8 @@ class OobeDisplay {
virtual AutoEnrollmentCheckScreenActor*
GetAutoEnrollmentCheckScreenActor() = 0;
virtual HIDDetectionScreenActor* GetHIDDetectionScreenActor() = 0;
- virtual LocallyManagedUserCreationScreenHandler*
- GetLocallyManagedUserCreationScreenActor() = 0;
+ virtual SupervisedUserCreationScreenHandler*
+ GetSupervisedUserCreationScreenActor() = 0;
virtual AppLaunchSplashScreenActor* GetAppLaunchSplashScreenActor() = 0;
virtual ControllerPairingScreenActor* GetControllerPairingScreenActor() = 0;
virtual HostPairingScreenActor* GetHostPairingScreenActor() = 0;
diff --git a/chrome/browser/chromeos/login/users/fake_supervised_user_manager.cc b/chrome/browser/chromeos/login/users/fake_supervised_user_manager.cc
index 8fb334f..e83ab5a 100644
--- a/chrome/browser/chromeos/login/users/fake_supervised_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/fake_supervised_user_manager.cc
@@ -41,22 +41,22 @@ const User* FakeSupervisedUserManager::FindBySyncId(
}
std::string FakeSupervisedUserManager::GetUserSyncId(
- const std::string& managed_user_id) const {
+ const std::string& supervised_user_id) const {
return std::string();
}
base::string16 FakeSupervisedUserManager::GetManagerDisplayName(
- const std::string& managed_user_id) const {
+ const std::string& supervised_user_id) const {
return base::string16();
}
std::string FakeSupervisedUserManager::GetManagerUserId(
- const std::string& managed_user_id) const {
+ const std::string& supervised_user_id) const {
return std::string();
}
std::string FakeSupervisedUserManager::GetManagerDisplayEmail(
- const std::string& managed_user_id) const {
+ const std::string& supervised_user_id) const {
return std::string();
}
diff --git a/chrome/browser/chromeos/login/users/fake_user_manager.cc b/chrome/browser/chromeos/login/users/fake_user_manager.cc
index 3913bce..53498f0 100644
--- a/chrome/browser/chromeos/login/users/fake_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/fake_user_manager.cc
@@ -247,7 +247,7 @@ bool FakeUserManager::IsLoggedInAsGuest() const {
return false;
}
-bool FakeUserManager::IsLoggedInAsLocallyManagedUser() const {
+bool FakeUserManager::IsLoggedInAsSupervisedUser() const {
return false;
}
@@ -279,7 +279,7 @@ UserFlow* FakeUserManager::GetUserFlow(const std::string& email) const {
return NULL;
}
-bool FakeUserManager::AreLocallyManagedUsersAllowed() const {
+bool FakeUserManager::AreSupervisedUsersAllowed() const {
return true;
}
diff --git a/chrome/browser/chromeos/login/users/fake_user_manager.h b/chrome/browser/chromeos/login/users/fake_user_manager.h
index b44875b..e145977 100644
--- a/chrome/browser/chromeos/login/users/fake_user_manager.h
+++ b/chrome/browser/chromeos/login/users/fake_user_manager.h
@@ -95,7 +95,7 @@ class FakeUserManager : public UserManager {
virtual bool IsLoggedInAsDemoUser() const OVERRIDE;
virtual bool IsLoggedInAsPublicAccount() const OVERRIDE;
virtual bool IsLoggedInAsGuest() const OVERRIDE;
- virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE;
+ virtual bool IsLoggedInAsSupervisedUser() const OVERRIDE;
virtual bool IsLoggedInAsKioskApp() const OVERRIDE;
virtual bool IsLoggedInAsStub() const OVERRIDE;
virtual bool IsSessionStarted() const OVERRIDE;
@@ -112,7 +112,7 @@ class FakeUserManager : public UserManager {
virtual void RemoveSessionStateObserver(
UserSessionStateObserver* obs) OVERRIDE {}
virtual void NotifyLocalStateChanged() OVERRIDE {}
- virtual bool AreLocallyManagedUsersAllowed() const OVERRIDE;
+ virtual bool AreSupervisedUsersAllowed() const OVERRIDE;
void set_owner_email(const std::string& owner_email) {
owner_email_ = owner_email;
diff --git a/chrome/browser/chromeos/login/users/mock_user_manager.h b/chrome/browser/chromeos/login/users/mock_user_manager.h
index 67a05a9..f6bc52c 100644
--- a/chrome/browser/chromeos/login/users/mock_user_manager.h
+++ b/chrome/browser/chromeos/login/users/mock_user_manager.h
@@ -58,7 +58,7 @@ class MockUserManager : public UserManager {
MOCK_CONST_METHOD0(IsLoggedInAsDemoUser, bool(void));
MOCK_CONST_METHOD0(IsLoggedInAsPublicAccount, bool(void));
MOCK_CONST_METHOD0(IsLoggedInAsGuest, bool(void));
- MOCK_CONST_METHOD0(IsLoggedInAsLocallyManagedUser, bool(void));
+ MOCK_CONST_METHOD0(IsLoggedInAsSupervisedUser, bool(void));
MOCK_CONST_METHOD0(IsLoggedInAsKioskApp, bool(void));
MOCK_CONST_METHOD0(IsLoggedInAsStub, bool(void));
MOCK_CONST_METHOD0(IsSessionStarted, bool(void));
@@ -74,7 +74,7 @@ class MockUserManager : public UserManager {
MOCK_METHOD2(SetUserFlow, void(const std::string&, UserFlow*));
MOCK_METHOD1(ResetUserFlow, void(const std::string&));
- MOCK_CONST_METHOD0(AreLocallyManagedUsersAllowed, bool(void));
+ MOCK_CONST_METHOD0(AreSupervisedUsersAllowed, bool(void));
// You can't mock these functions easily because nobody can create
// User objects but the UserManagerImpl and us.
diff --git a/chrome/browser/chromeos/login/users/supervised_user_manager.h b/chrome/browser/chromeos/login/users/supervised_user_manager.h
index f86a8f3..c7bab16 100644
--- a/chrome/browser/chromeos/login/users/supervised_user_manager.h
+++ b/chrome/browser/chromeos/login/users/supervised_user_manager.h
@@ -58,7 +58,7 @@ class SupervisedUserManager {
// and persists that to user list. Also links this user identified by
// |sync_user_id| to manager with a |manager_id|.
// Returns created user, or existing user if there already
- // was locally managed user with such display name.
+ // was a supervised user with such display name.
// TODO(antrim): Refactor into a single struct to have only 1 getter.
virtual const User* CreateUserRecord(
const std::string& manager_id,
@@ -105,7 +105,7 @@ class SupervisedUserManager {
// Add user id to supervised user creation transaction record.
virtual void SetCreationTransactionUserId(const std::string& user_id) = 0;
- // Remove locally managed user creation transaction record.
+ // Remove supervised user creation transaction record.
virtual void CommitCreationTransaction() = 0;
// Return object that handles specifics of supervised user authentication.
diff --git a/chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc b/chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc
index a892ad8..d1e2480 100644
--- a/chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc
@@ -15,8 +15,8 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chrome/browser/chromeos/login/users/user_manager_impl.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/supervised_user/supervised_user_service.h"
@@ -32,36 +32,32 @@ using content::BrowserThread;
namespace {
// Names for pref keys in Local State.
-// A map from locally managed user local user id to sync user id.
-const char kSupervisedUserSyncId[] =
- "ManagedUserSyncId";
+// A map from supervised user local user id to sync user id.
+const char kSupervisedUserSyncId[] = "ManagedUserSyncId";
-// A map from locally managed user id to manager user id.
-const char kSupervisedUserManagers[] =
- "ManagedUserManagers";
+// A map from supervised user id to manager user id.
+const char kSupervisedUserManagers[] = "ManagedUserManagers";
-// A map from locally managed user id to manager display name.
-const char kSupervisedUserManagerNames[] =
- "ManagedUserManagerNames";
+// A map from supervised user id to manager display name.
+const char kSupervisedUserManagerNames[] = "ManagedUserManagerNames";
-// A map from locally managed user id to manager display e-mail.
+// A map from supervised user id to manager display e-mail.
const char kSupervisedUserManagerDisplayEmails[] =
"ManagedUserManagerDisplayEmails";
-// A vector pref of the locally managed accounts defined on this device, that
-// had not logged in yet.
-const char kLocallyManagedUsersFirstRun[] = "LocallyManagedUsersFirstRun";
+// A vector pref of the supervised accounts defined on this device, that had
+// not logged in yet.
+const char kSupervisedUsersFirstRun[] = "LocallyManagedUsersFirstRun";
-// A pref of the next id for locally managed users generation.
-const char kLocallyManagedUsersNextId[] =
- "LocallyManagedUsersNextId";
+// A pref of the next id for supervised users generation.
+const char kSupervisedUsersNextId[] = "LocallyManagedUsersNextId";
-// A pref of the next id for locally managed users generation.
-const char kLocallyManagedUserCreationTransactionDisplayName[] =
+// A pref of the next id for supervised users generation.
+const char kSupervisedUserCreationTransactionDisplayName[] =
"LocallyManagedUserCreationTransactionDisplayName";
-// A pref of the next id for locally managed users generation.
-const char kLocallyManagedUserCreationTransactionUserId[] =
+// A pref of the next id for supervised users generation.
+const char kSupervisedUserCreationTransactionUserId[] =
"LocallyManagedUserCreationTransactionUserId";
// A map from user id to password schema id.
@@ -114,12 +110,12 @@ const int kMinPasswordRevision = 1;
// static
void SupervisedUserManager::RegisterPrefs(PrefRegistrySimple* registry) {
- registry->RegisterListPref(kLocallyManagedUsersFirstRun);
- registry->RegisterIntegerPref(kLocallyManagedUsersNextId, 0);
+ registry->RegisterListPref(kSupervisedUsersFirstRun);
+ registry->RegisterIntegerPref(kSupervisedUsersNextId, 0);
registry->RegisterStringPref(
- kLocallyManagedUserCreationTransactionDisplayName, "");
+ kSupervisedUserCreationTransactionDisplayName, "");
registry->RegisterStringPref(
- kLocallyManagedUserCreationTransactionUserId, "");
+ kSupervisedUserCreationTransactionUserId, "");
registry->RegisterDictionaryPref(kSupervisedUserSyncId);
registry->RegisterDictionaryPref(kSupervisedUserManagers);
registry->RegisterDictionaryPref(kSupervisedUserManagerNames);
@@ -146,12 +142,12 @@ SupervisedUserManagerImpl::~SupervisedUserManagerImpl() {
std::string SupervisedUserManagerImpl::GenerateUserId() {
int counter = g_browser_process->local_state()->
- GetInteger(kLocallyManagedUsersNextId);
+ GetInteger(kSupervisedUsersNextId);
std::string id;
bool user_exists;
do {
id = base::StringPrintf(
- "%d@%s", counter, chromeos::login::kLocallyManagedUserDomain);
+ "%d@%s", counter, chromeos::login::kSupervisedUserDomain);
counter++;
user_exists = (NULL != owner_->FindUser(id));
DCHECK(!user_exists);
@@ -161,7 +157,7 @@ std::string SupervisedUserManagerImpl::GenerateUserId() {
} while (user_exists);
g_browser_process->local_state()->
- SetInteger(kLocallyManagedUsersNextId, counter);
+ SetInteger(kSupervisedUsersNextId, counter);
g_browser_process->local_state()->CommitPendingWrite();
return id;
@@ -171,7 +167,7 @@ bool SupervisedUserManagerImpl::HasSupervisedUsers(
const std::string& manager_id) const {
const UserList& users = owner_->GetUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
- if ((*it)->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) {
+ if ((*it)->GetType() == user_manager::USER_TYPE_SUPERVISED) {
if (manager_id == GetManagerUserId((*it)->email()))
return true;
}
@@ -193,12 +189,12 @@ const User* SupervisedUserManagerImpl::CreateUserRecord(
PrefService* local_state = g_browser_process->local_state();
- User* new_user = User::CreateLocallyManagedUser(local_user_id);
+ User* new_user = User::CreateSupervisedUser(local_user_id);
owner_->AddUserRecord(new_user);
ListPrefUpdate prefs_new_users_update(local_state,
- kLocallyManagedUsersFirstRun);
+ kSupervisedUsersFirstRun);
DictionaryPrefUpdate sync_id_update(local_state, kSupervisedUserSyncId);
DictionaryPrefUpdate manager_update(local_state, kSupervisedUserManagers);
DictionaryPrefUpdate manager_name_update(local_state,
@@ -361,7 +357,7 @@ const User* SupervisedUserManagerImpl::FindByDisplayName(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
const UserList& users = owner_->GetUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
- if (((*it)->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) &&
+ if (((*it)->GetType() == user_manager::USER_TYPE_SUPERVISED) &&
((*it)->display_name() == display_name)) {
return *it;
}
@@ -374,7 +370,7 @@ const User* SupervisedUserManagerImpl::FindBySyncId(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
const UserList& users = owner_->GetUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
- if (((*it)->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) &&
+ if (((*it)->GetType() == user_manager::USER_TYPE_SUPERVISED) &&
(GetUserSyncId((*it)->email()) == sync_id)) {
return *it;
}
@@ -385,7 +381,7 @@ const User* SupervisedUserManagerImpl::FindBySyncId(
void SupervisedUserManagerImpl::StartCreationTransaction(
const base::string16& display_name) {
g_browser_process->local_state()->
- SetString(kLocallyManagedUserCreationTransactionDisplayName,
+ SetString(kSupervisedUserCreationTransactionDisplayName,
base::UTF16ToASCII(display_name));
g_browser_process->local_state()->CommitPendingWrite();
}
@@ -393,22 +389,22 @@ void SupervisedUserManagerImpl::StartCreationTransaction(
void SupervisedUserManagerImpl::SetCreationTransactionUserId(
const std::string& email) {
g_browser_process->local_state()->
- SetString(kLocallyManagedUserCreationTransactionUserId,
+ SetString(kSupervisedUserCreationTransactionUserId,
email);
g_browser_process->local_state()->CommitPendingWrite();
}
void SupervisedUserManagerImpl::CommitCreationTransaction() {
g_browser_process->local_state()->
- ClearPref(kLocallyManagedUserCreationTransactionDisplayName);
+ ClearPref(kSupervisedUserCreationTransactionDisplayName);
g_browser_process->local_state()->
- ClearPref(kLocallyManagedUserCreationTransactionUserId);
+ ClearPref(kSupervisedUserCreationTransactionUserId);
g_browser_process->local_state()->CommitPendingWrite();
}
bool SupervisedUserManagerImpl::HasFailedUserCreationTransaction() {
return !(g_browser_process->local_state()->
- GetString(kLocallyManagedUserCreationTransactionDisplayName).
+ GetString(kSupervisedUserCreationTransactionDisplayName).
empty());
}
@@ -416,40 +412,40 @@ void SupervisedUserManagerImpl::RollbackUserCreationTransaction() {
PrefService* prefs = g_browser_process->local_state();
std::string display_name = prefs->
- GetString(kLocallyManagedUserCreationTransactionDisplayName);
+ GetString(kSupervisedUserCreationTransactionDisplayName);
std::string user_id = prefs->
- GetString(kLocallyManagedUserCreationTransactionUserId);
+ GetString(kSupervisedUserCreationTransactionUserId);
LOG(WARNING) << "Cleaning up transaction for "
<< display_name << "/" << user_id;
if (user_id.empty()) {
// Not much to do - just remove transaction.
- prefs->ClearPref(kLocallyManagedUserCreationTransactionDisplayName);
+ prefs->ClearPref(kSupervisedUserCreationTransactionDisplayName);
prefs->CommitPendingWrite();
return;
}
if (gaia::ExtractDomainName(user_id) !=
- chromeos::login::kLocallyManagedUserDomain) {
- LOG(WARNING) << "Clean up transaction for non-locally managed user found :"
+ chromeos::login::kSupervisedUserDomain) {
+ LOG(WARNING) << "Clean up transaction for non-supervised user found :"
<< user_id << ", will not remove data";
- prefs->ClearPref(kLocallyManagedUserCreationTransactionDisplayName);
- prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId);
+ prefs->ClearPref(kSupervisedUserCreationTransactionDisplayName);
+ prefs->ClearPref(kSupervisedUserCreationTransactionUserId);
prefs->CommitPendingWrite();
return;
}
owner_->RemoveNonOwnerUserInternal(user_id, NULL);
- prefs->ClearPref(kLocallyManagedUserCreationTransactionDisplayName);
- prefs->ClearPref(kLocallyManagedUserCreationTransactionUserId);
+ prefs->ClearPref(kSupervisedUserCreationTransactionDisplayName);
+ prefs->ClearPref(kSupervisedUserCreationTransactionUserId);
prefs->CommitPendingWrite();
}
void SupervisedUserManagerImpl::RemoveNonCryptohomeData(
const std::string& user_id) {
PrefService* prefs = g_browser_process->local_state();
- ListPrefUpdate prefs_new_users_update(prefs, kLocallyManagedUsersFirstRun);
+ ListPrefUpdate prefs_new_users_update(prefs, kSupervisedUsersFirstRun);
prefs_new_users_update->Remove(base::StringValue(user_id), NULL);
CleanPref(user_id, kSupervisedUserSyncId);
@@ -472,7 +468,7 @@ void SupervisedUserManagerImpl::CleanPref(const std::string& user_id,
bool SupervisedUserManagerImpl::CheckForFirstRun(const std::string& user_id) {
ListPrefUpdate prefs_new_users_update(g_browser_process->local_state(),
- kLocallyManagedUsersFirstRun);
+ kSupervisedUsersFirstRun);
return prefs_new_users_update->Remove(base::StringValue(user_id), NULL);
}
diff --git a/chrome/browser/chromeos/login/users/supervised_user_manager_impl.h b/chrome/browser/chromeos/login/users/supervised_user_manager_impl.h
index 65d2015..7430817 100644
--- a/chrome/browser/chromeos/login/users/supervised_user_manager_impl.h
+++ b/chrome/browser/chromeos/login/users/supervised_user_manager_impl.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/login/users/user.cc b/chrome/browser/chromeos/login/users/user.cc
index 4640caa..66e12ca 100644
--- a/chrome/browser/chromeos/login/users/user.cc
+++ b/chrome/browser/chromeos/login/users/user.cc
@@ -71,17 +71,17 @@ class KioskAppUser : public User {
DISALLOW_COPY_AND_ASSIGN(KioskAppUser);
};
-class LocallyManagedUser : public User {
+class SupervisedUser : public User {
public:
- explicit LocallyManagedUser(const std::string& username);
- virtual ~LocallyManagedUser();
+ explicit SupervisedUser(const std::string& username);
+ virtual ~SupervisedUser();
// Overridden from User:
virtual user_manager::UserType GetType() const OVERRIDE;
virtual std::string display_email() const OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(LocallyManagedUser);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUser);
};
class RetailModeUser : public User {
@@ -178,8 +178,8 @@ User* User::CreateKioskAppUser(const std::string& kiosk_app_username) {
return new KioskAppUser(kiosk_app_username);
}
-User* User::CreateLocallyManagedUser(const std::string& username) {
- return new LocallyManagedUser(username);
+User* User::CreateSupervisedUser(const std::string& username) {
+ return new SupervisedUser(username);
}
User* User::CreateRetailModeUser() {
@@ -267,18 +267,18 @@ user_manager::UserType KioskAppUser::GetType() const {
return user_manager::USER_TYPE_KIOSK_APP;
}
-LocallyManagedUser::LocallyManagedUser(const std::string& username)
+SupervisedUser::SupervisedUser(const std::string& username)
: User(username) {
set_can_lock(true);
}
-LocallyManagedUser::~LocallyManagedUser() {}
+SupervisedUser::~SupervisedUser() {}
-user_manager::UserType LocallyManagedUser::GetType() const {
- return user_manager::USER_TYPE_LOCALLY_MANAGED;
+user_manager::UserType SupervisedUser::GetType() const {
+ return user_manager::USER_TYPE_SUPERVISED;
}
-std::string LocallyManagedUser::display_email() const {
+std::string SupervisedUser::display_email() const {
return base::UTF16ToUTF8(display_name());
}
@@ -309,7 +309,7 @@ bool User::has_gaia_account() const {
case user_manager::USER_TYPE_GUEST:
case user_manager::USER_TYPE_RETAIL_MODE:
case user_manager::USER_TYPE_PUBLIC_ACCOUNT:
- case user_manager::USER_TYPE_LOCALLY_MANAGED:
+ case user_manager::USER_TYPE_SUPERVISED:
case user_manager::USER_TYPE_KIOSK_APP:
return false;
default:
diff --git a/chrome/browser/chromeos/login/users/user.h b/chrome/browser/chromeos/login/users/user.h
index 5289962..9a9f54f 100644
--- a/chrome/browser/chromeos/login/users/user.h
+++ b/chrome/browser/chromeos/login/users/user.h
@@ -149,7 +149,7 @@ class User : public user_manager::UserInfo {
static User* CreateRegularUser(const std::string& email);
static User* CreateGuestUser();
static User* CreateKioskAppUser(const std::string& kiosk_app_username);
- static User* CreateLocallyManagedUser(const std::string& username);
+ static User* CreateSupervisedUser(const std::string& username);
static User* CreateRetailModeUser();
static User* CreatePublicAccountUser(const std::string& email);
diff --git a/chrome/browser/chromeos/login/users/user_manager.h b/chrome/browser/chromeos/login/users/user_manager.h
index aec52ba..fbbf45c 100644
--- a/chrome/browser/chromeos/login/users/user_manager.h
+++ b/chrome/browser/chromeos/login/users/user_manager.h
@@ -262,8 +262,8 @@ class UserManager {
// Returns true if we're logged in as a Guest.
virtual bool IsLoggedInAsGuest() const = 0;
- // Returns true if we're logged in as a locally managed user.
- virtual bool IsLoggedInAsLocallyManagedUser() const = 0;
+ // Returns true if we're logged in as a supervised user.
+ virtual bool IsLoggedInAsSupervisedUser() const = 0;
// Returns true if we're logged in as a kiosk app.
virtual bool IsLoggedInAsKioskApp() const = 0;
@@ -309,8 +309,8 @@ class UserManager {
virtual void NotifyLocalStateChanged() = 0;
- // Returns true if locally managed users allowed.
- virtual bool AreLocallyManagedUsersAllowed() const = 0;
+ // Returns true if supervised users allowed.
+ virtual bool AreSupervisedUsersAllowed() const = 0;
private:
friend class ScopedUserManagerEnabler;
diff --git a/chrome/browser/chromeos/login/users/user_manager_impl.cc b/chrome/browser/chromeos/login/users/user_manager_impl.cc
index 0d23f42..9165d10 100644
--- a/chrome/browser/chromeos/login/users/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/user_manager_impl.cc
@@ -409,11 +409,11 @@ void UserManagerImpl::UserLoggedIn(const std::string& user_id,
if (user && user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT) {
PublicAccountUserLoggedIn(user);
} else if ((user &&
- user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) ||
+ user->GetType() == user_manager::USER_TYPE_SUPERVISED) ||
(!user &&
gaia::ExtractDomainName(user_id) ==
- chromeos::login::kLocallyManagedUserDomain)) {
- LocallyManagedUserLoggedIn(user_id);
+ chromeos::login::kSupervisedUserDomain)) {
+ SupervisedUserLoggedIn(user_id);
} else if (browser_restart && user_id == g_browser_process->local_state()->
GetString(kPublicAccountPendingDataRemoval)) {
PublicAccountUserLoggedIn(User::CreatePublicAccountUser(user_id));
@@ -515,7 +515,7 @@ void UserManagerImpl::RemoveUser(const std::string& user_id,
const User* user = FindUser(user_id);
if (!user || (user->GetType() != user_manager::USER_TYPE_REGULAR &&
- user->GetType() != user_manager::USER_TYPE_LOCALLY_MANAGED))
+ user->GetType() != user_manager::USER_TYPE_SUPERVISED))
return;
// Sanity check: we must not remove single user unless it's an enterprise
@@ -578,10 +578,10 @@ void UserManagerImpl::RemoveUserFromList(const std::string& user_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
RemoveNonCryptohomeData(user_id);
if (user_loading_stage_ == STAGE_LOADED) {
- DeleteUser(RemoveRegularOrLocallyManagedUserFromList(user_id));
+ DeleteUser(RemoveRegularOrSupervisedUserFromList(user_id));
} else if (user_loading_stage_ == STAGE_LOADING) {
DCHECK(gaia::ExtractDomainName(user_id) ==
- chromeos::login::kLocallyManagedUserDomain);
+ chromeos::login::kSupervisedUserDomain);
// Special case, removing partially-constructed supervised user during user
// list loading.
ListPrefUpdate users_update(g_browser_process->local_state(),
@@ -784,7 +784,7 @@ void UserManagerImpl::Observe(int type,
if (IsUserLoggedIn() &&
!IsLoggedInAsGuest() &&
!IsLoggedInAsKioskApp()) {
- if (IsLoggedInAsLocallyManagedUser())
+ if (IsLoggedInAsSupervisedUser())
SupervisedUserPasswordServiceFactory::GetForProfile(profile);
if (IsLoggedInAsRegularUser())
ManagerPasswordServiceFactory::GetForProfile(profile);
@@ -927,10 +927,10 @@ bool UserManagerImpl::IsLoggedInAsGuest() const {
active_user_->GetType() == user_manager::USER_TYPE_GUEST;
}
-bool UserManagerImpl::IsLoggedInAsLocallyManagedUser() const {
+bool UserManagerImpl::IsLoggedInAsSupervisedUser() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return IsUserLoggedIn() &&
- active_user_->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED;
+ active_user_->GetType() == user_manager::USER_TYPE_SUPERVISED;
}
bool UserManagerImpl::IsLoggedInAsKioskApp() const {
@@ -1050,7 +1050,7 @@ void UserManagerImpl::EnsureUsersLoaded() {
UpdatePublicAccountDisplayName(*it);
}
- // Load regular users and locally managed users.
+ // Load regular users and supervised users.
std::vector<std::string> regular_users;
std::set<std::string> regular_users_set;
ParseUserList(*prefs_regular_users, public_sessions_set,
@@ -1059,8 +1059,8 @@ void UserManagerImpl::EnsureUsersLoaded() {
it != regular_users.end(); ++it) {
User* user = NULL;
const std::string domain = gaia::ExtractDomainName(*it);
- if (domain == chromeos::login::kLocallyManagedUserDomain)
- user = User::CreateLocallyManagedUser(*it);
+ if (domain == chromeos::login::kSupervisedUserDomain)
+ user = User::CreateSupervisedUser(*it);
else
user = User::CreateRegularUser(*it);
user->set_oauth_token_status(LoadUserOAuthStatus(*it));
@@ -1201,7 +1201,7 @@ void UserManagerImpl::AddUserRecord(User* user) {
void UserManagerImpl::RegularUserLoggedIn(const std::string& user_id) {
// Remove the user from the user list.
- active_user_ = RemoveRegularOrLocallyManagedUserFromList(user_id);
+ active_user_ = RemoveRegularOrSupervisedUserFromList(user_id);
// If the user was not found on the user list, create a new user.
is_current_user_new_ = !active_user_;
@@ -1233,16 +1233,16 @@ void UserManagerImpl::RegularUserLoggedInAsEphemeral(
WallpaperManager::Get()->SetUserWallpaperNow(user_id);
}
-void UserManagerImpl::LocallyManagedUserLoggedIn(
+void UserManagerImpl::SupervisedUserLoggedIn(
const std::string& user_id) {
// TODO(nkostylev): Refactor, share code with RegularUserLoggedIn().
// Remove the user from the user list.
- active_user_ = RemoveRegularOrLocallyManagedUserFromList(user_id);
+ active_user_ = RemoveRegularOrSupervisedUserFromList(user_id);
// If the user was not found on the user list, create a new user.
if (!active_user_) {
is_current_user_new_ = true;
- active_user_ = User::CreateLocallyManagedUser(user_id);
+ active_user_ = User::CreateSupervisedUser(user_id);
// Leaving OAuth token status at the default state = unknown.
WallpaperManager::Get()->SetUserWallpaperNow(user_id);
} else {
@@ -1441,7 +1441,7 @@ void UserManagerImpl::RemoveNonCryptohomeData(const std::string& user_id) {
multi_profile_user_controller_->RemoveCachedValues(user_id);
}
-User* UserManagerImpl::RemoveRegularOrLocallyManagedUserFromList(
+User* UserManagerImpl::RemoveRegularOrSupervisedUserFromList(
const std::string& user_id) {
ListPrefUpdate prefs_users_update(g_browser_process->local_state(),
kRegularUsers);
@@ -1454,7 +1454,7 @@ User* UserManagerImpl::RemoveRegularOrLocallyManagedUserFromList(
it = users_.erase(it);
} else {
if ((*it)->GetType() == user_manager::USER_TYPE_REGULAR ||
- (*it)->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) {
+ (*it)->GetType() == user_manager::USER_TYPE_SUPERVISED) {
prefs_users_update->Append(new base::StringValue(user_email));
}
++it;
@@ -1630,11 +1630,11 @@ void UserManagerImpl::ResetUserFlow(const std::string& user_id) {
}
}
-bool UserManagerImpl::AreLocallyManagedUsersAllowed() const {
- bool locally_managed_users_allowed = false;
+bool UserManagerImpl::AreSupervisedUsersAllowed() const {
+ bool supervised_users_allowed = false;
cros_settings_->GetBoolean(kAccountsPrefSupervisedUsersEnabled,
- &locally_managed_users_allowed);
- return locally_managed_users_allowed;
+ &supervised_users_allowed);
+ return supervised_users_allowed;
}
UserFlow* UserManagerImpl::GetDefaultUserFlow() const {
@@ -1691,8 +1691,8 @@ void UserManagerImpl::UpdateLoginState() {
login_user_type = LoginState::LOGGED_IN_USER_RETAIL_MODE;
else if (active_user_->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT)
login_user_type = LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT;
- else if (active_user_->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED)
- login_user_type = LoginState::LOGGED_IN_USER_LOCALLY_MANAGED;
+ else if (active_user_->GetType() == user_manager::USER_TYPE_SUPERVISED)
+ login_user_type = LoginState::LOGGED_IN_USER_SUPERVISED;
else if (active_user_->GetType() == user_manager::USER_TYPE_KIOSK_APP)
login_user_type = LoginState::LOGGED_IN_USER_KIOSK_APP;
else
diff --git a/chrome/browser/chromeos/login/users/user_manager_impl.h b/chrome/browser/chromeos/login/users/user_manager_impl.h
index f4ea867..738f87c 100644
--- a/chrome/browser/chromeos/login/users/user_manager_impl.h
+++ b/chrome/browser/chromeos/login/users/user_manager_impl.h
@@ -105,7 +105,7 @@ class UserManagerImpl
virtual bool IsLoggedInAsDemoUser() const OVERRIDE;
virtual bool IsLoggedInAsPublicAccount() const OVERRIDE;
virtual bool IsLoggedInAsGuest() const OVERRIDE;
- virtual bool IsLoggedInAsLocallyManagedUser() const OVERRIDE;
+ virtual bool IsLoggedInAsSupervisedUser() const OVERRIDE;
virtual bool IsLoggedInAsKioskApp() const OVERRIDE;
virtual bool IsLoggedInAsStub() const OVERRIDE;
virtual bool IsSessionStarted() const OVERRIDE;
@@ -123,7 +123,7 @@ class UserManagerImpl
virtual UserFlow* GetUserFlow(const std::string& user_id) const OVERRIDE;
virtual void SetUserFlow(const std::string& user_id, UserFlow* flow) OVERRIDE;
virtual void ResetUserFlow(const std::string& user_id) OVERRIDE;
- virtual bool AreLocallyManagedUsersAllowed() const OVERRIDE;
+ virtual bool AreSupervisedUsersAllowed() const OVERRIDE;
// content::NotificationObserver implementation.
virtual void Observe(int type,
@@ -202,8 +202,8 @@ class UserManagerImpl
// Indicates that a regular user just logged in as ephemeral.
void RegularUserLoggedInAsEphemeral(const std::string& user_id);
- // Indicates that a locally managed user just logged in.
- void LocallyManagedUserLoggedIn(const std::string& user_id);
+ // Indicates that a supervised user just logged in.
+ void SupervisedUserLoggedIn(const std::string& user_id);
// Indicates that a user just logged into a public session.
void PublicAccountUserLoggedIn(User* user);
@@ -237,10 +237,10 @@ class UserManagerImpl
// avatar, OAuth token status, display name, display email).
void RemoveNonCryptohomeData(const std::string& user_id);
- // Removes a regular or locally managed user from the user list.
+ // Removes a regular or supervised user from the user list.
// Returns the user if found or NULL otherwise.
// Also removes the user from the persistent user list.
- User* RemoveRegularOrLocallyManagedUserFromList(const std::string& user_id);
+ User* RemoveRegularOrSupervisedUserFromList(const std::string& user_id);
// If data for a public account is marked as pending removal and the user is
// no longer logged into that account, removes the data.
diff --git a/chrome/browser/chromeos/login/users/user_manager_unittest.cc b/chrome/browser/chromeos/login/users/user_manager_unittest.cc
index 638f16d..8aa2f16 100644
--- a/chrome/browser/chromeos/login/users/user_manager_unittest.cc
+++ b/chrome/browser/chromeos/login/users/user_manager_unittest.cc
@@ -133,7 +133,7 @@ class UserManagerTest : public testing::Test {
void SetDeviceSettings(bool ephemeral_users_enabled,
const std::string &owner,
- bool locally_managed_users_enabled) {
+ bool supervised_users_enabled) {
base::FundamentalValue
ephemeral_users_enabled_value(ephemeral_users_enabled);
stub_settings_provider_.Set(kAccountsPrefEphemeralUsersEnabled,
@@ -141,7 +141,7 @@ class UserManagerTest : public testing::Test {
base::StringValue owner_value(owner);
stub_settings_provider_.Set(kDeviceOwner, owner_value);
stub_settings_provider_.Set(kAccountsPrefSupervisedUsersEnabled,
- base::FundamentalValue(locally_managed_users_enabled));
+ base::FundamentalValue(supervised_users_enabled));
}
void RetrieveTrustedDevicePolicies() {
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index aa46351..21a0cdf 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -32,7 +32,6 @@
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/hwid_checker.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.h"
#include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
#include "chrome/browser/chromeos/login/screens/eula_screen.h"
@@ -47,6 +46,7 @@
#include "chrome/browser/chromeos/login/screens/user_image_screen.h"
#include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h"
#include "chrome/browser/chromeos/login/ui/oobe_display.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
@@ -158,7 +158,7 @@ const char WizardController::kTermsOfServiceScreenName[] = "tos";
const char WizardController::kAutoEnrollmentCheckScreenName[] =
"auto-enrollment-check";
const char WizardController::kWrongHWIDScreenName[] = "wrong-hwid";
-const char WizardController::kLocallyManagedUserCreationScreenName[] =
+const char WizardController::kSupervisedUserCreationScreenName[] =
"locally-managed-user-creation-flow";
const char WizardController::kAppLaunchSplashScreenName[] =
"app-launch-splash";
@@ -374,14 +374,14 @@ chromeos::AutoEnrollmentCheckScreen*
return auto_enrollment_check_screen_.get();
}
-chromeos::LocallyManagedUserCreationScreen*
- WizardController::GetLocallyManagedUserCreationScreen() {
- if (!locally_managed_user_creation_screen_.get()) {
- locally_managed_user_creation_screen_.reset(
- new chromeos::LocallyManagedUserCreationScreen(
- this, oobe_display_->GetLocallyManagedUserCreationScreenActor()));
+chromeos::SupervisedUserCreationScreen*
+ WizardController::GetSupervisedUserCreationScreen() {
+ if (!supervised_user_creation_screen_.get()) {
+ supervised_user_creation_screen_.reset(
+ new chromeos::SupervisedUserCreationScreen(
+ this, oobe_display_->GetSupervisedUserCreationScreenActor()));
}
- return locally_managed_user_creation_screen_.get();
+ return supervised_user_creation_screen_.get();
}
chromeos::HIDDetectionScreen* WizardController::GetHIDDetectionScreen() {
@@ -558,11 +558,11 @@ void WizardController::ShowAutoEnrollmentCheckScreen() {
SetCurrentScreen(screen);
}
-void WizardController::ShowLocallyManagedUserCreationScreen() {
+void WizardController::ShowSupervisedUserCreationScreen() {
VLOG(1) << "Showing Locally managed user creation screen screen.";
SetStatusAreaVisible(true);
- LocallyManagedUserCreationScreen* screen =
- GetLocallyManagedUserCreationScreen();
+ SupervisedUserCreationScreen* screen =
+ GetSupervisedUserCreationScreen();
SetCurrentScreen(screen);
}
@@ -935,8 +935,8 @@ void WizardController::AdvanceToScreen(const std::string& screen_name) {
ShowWrongHWIDScreen();
} else if (screen_name == kAutoEnrollmentCheckScreenName) {
ShowAutoEnrollmentCheckScreen();
- } else if (screen_name == kLocallyManagedUserCreationScreenName) {
- ShowLocallyManagedUserCreationScreen();
+ } else if (screen_name == kSupervisedUserCreationScreenName) {
+ ShowSupervisedUserCreationScreen();
} else if (screen_name == kAppLaunchSplashScreenName) {
AutoLaunchKioskApp();
} else if (screen_name == kHIDDetectionScreenName) {
diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h
index 8d298b4..887ef88 100644
--- a/chrome/browser/chromeos/login/wizard_controller.h
+++ b/chrome/browser/chromeos/login/wizard_controller.h
@@ -37,18 +37,18 @@ class ControllerPairingScreen;
class EnrollmentScreen;
class ErrorScreen;
class EulaScreen;
+struct Geoposition;
class HIDDetectionScreen;
class HostPairingScreen;
-struct Geoposition;
class KioskAutolaunchScreen;
class KioskEnableScreen;
-class LocallyManagedUserCreationScreen;
class LoginDisplayHost;
class LoginScreenContext;
class NetworkScreen;
class OobeDisplay;
class ResetScreen;
class SimpleGeolocationProvider;
+class SupervisedUserCreationScreen;
class TermsOfServiceScreen;
class TimeZoneProvider;
struct TimeZoneResponseData;
@@ -145,7 +145,7 @@ class WizardController : public ScreenObserver {
TermsOfServiceScreen* GetTermsOfServiceScreen();
WrongHWIDScreen* GetWrongHWIDScreen();
AutoEnrollmentCheckScreen* GetAutoEnrollmentCheckScreen();
- LocallyManagedUserCreationScreen* GetLocallyManagedUserCreationScreen();
+ SupervisedUserCreationScreen* GetSupervisedUserCreationScreen();
HIDDetectionScreen* GetHIDDetectionScreen();
ControllerPairingScreen* GetControllerPairingScreen();
HostPairingScreen* GetHostPairingScreen();
@@ -172,7 +172,7 @@ class WizardController : public ScreenObserver {
static const char kTermsOfServiceScreenName[];
static const char kAutoEnrollmentCheckScreenName[];
static const char kWrongHWIDScreenName[];
- static const char kLocallyManagedUserCreationScreenName[];
+ static const char kSupervisedUserCreationScreenName[];
static const char kAppLaunchSplashScreenName[];
static const char kHIDDetectionScreenName[];
static const char kControllerPairingScreenName[];
@@ -194,7 +194,7 @@ class WizardController : public ScreenObserver {
void ShowTermsOfServiceScreen();
void ShowWrongHWIDScreen();
void ShowAutoEnrollmentCheckScreen();
- void ShowLocallyManagedUserCreationScreen();
+ void ShowSupervisedUserCreationScreen();
void ShowHIDDetectionScreen();
void ShowControllerPairingScreen();
void ShowHostPairingScreen();
@@ -332,8 +332,7 @@ class WizardController : public ScreenObserver {
scoped_ptr<TermsOfServiceScreen> terms_of_service_screen_;
scoped_ptr<WrongHWIDScreen> wrong_hwid_screen_;
scoped_ptr<AutoEnrollmentCheckScreen> auto_enrollment_check_screen_;
- scoped_ptr<LocallyManagedUserCreationScreen>
- locally_managed_user_creation_screen_;
+ scoped_ptr<SupervisedUserCreationScreen> supervised_user_creation_screen_;
scoped_ptr<HIDDetectionScreen> hid_detection_screen_;
scoped_ptr<ControllerPairingScreen> controller_pairing_screen_;
scoped_ptr<HostPairingScreen> host_pairing_screen_;
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
index dc726fd..be6fba0 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
@@ -131,7 +131,7 @@ scoped_ptr<UserCloudPolicyManagerChromeOS>
// Only USER_TYPE_REGULAR users have user cloud policy.
// USER_TYPE_RETAIL_MODE, USER_TYPE_KIOSK_APP, USER_TYPE_GUEST and
- // USER_TYPE_LOCALLY_MANAGED are not signed in and can't authenticate the
+ // USER_TYPE_SUPERVISED are not signed in and can't authenticate the
// policy registration.
// USER_TYPE_PUBLIC_ACCOUNT gets its policy from the
// DeviceLocalAccountPolicyService.
diff --git a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
index 37f6900b1..8022a2c 100644
--- a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
@@ -165,19 +165,19 @@ TEST_F(ProfileListChromeOSTest, ShowLoggedInUsers) {
EXPECT_EQ(name3, item3.name);
}
-TEST_F(ProfileListChromeOSTest, DontShowManagedUsers) {
+TEST_F(ProfileListChromeOSTest, DontShowSupervisedUsers) {
base::string16 name1(ASCIIToUTF16("p1"));
- base::string16 managed_name(ASCIIToUTF16("p2@example.com"));
+ base::string16 supervised_name(ASCIIToUTF16("p2@example.com"));
AddProfile(name1, true);
// Add a managed user profile.
ProfileInfoCache* cache = manager()->profile_info_cache();
manager()->profile_info_cache()->AddProfileToCache(
- cache->GetUserDataDir().AppendASCII("p2"), managed_name,
+ cache->GetUserDataDir().AppendASCII("p2"), supervised_name,
base::string16(), 0, "TEST_ID");
- GetFakeUserManager()->AddUser(base::UTF16ToASCII(managed_name));
+ GetFakeUserManager()->AddUser(base::UTF16ToASCII(supervised_name));
AvatarMenu* menu = GetAvatarMenu();
ASSERT_EQ(1U, menu->GetNumberOfItems());
diff --git a/chrome/browser/chromeos/profiles/profile_util.h b/chrome/browser/chromeos/profiles/profile_util.h
index e6270b0..f7df074 100644
--- a/chrome/browser/chromeos/profiles/profile_util.h
+++ b/chrome/browser/chromeos/profiles/profile_util.h
@@ -11,7 +11,7 @@ namespace chromeos {
// Checks if the current log-in state and the profile is GAIA-authenticated and
// thus has access to Google services. This excludes, for example, public
-// accounts, locally managed users, guest or incognito profiles.
+// accounts, supervised users, guest or incognito profiles.
bool IsProfileAssociatedWithGaiaAccount(Profile* profile);
} // namespace chromeos
diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h
index d8daf84..d30cb01 100644
--- a/chrome/browser/profiles/profile_impl.h
+++ b/chrome/browser/profiles/profile_impl.h
@@ -31,8 +31,8 @@ class TrackedPreferenceValidationDelegate;
namespace chromeos {
class KioskTest;
class LocaleChangeGuard;
-class ManagedUserTestBase;
class Preferences;
+class SupervisedUserTestBase;
}
#endif
@@ -143,7 +143,7 @@ class ProfileImpl : public Profile {
private:
#if defined(OS_CHROMEOS)
friend class chromeos::KioskTest;
- friend class chromeos::ManagedUserTestBase;
+ friend class chromeos::SupervisedUserTestBase;
#endif
friend class Profile;
friend class BetterSessionRestoreCrashTest;
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc
index f39cb0c..f4a9a87 100644
--- a/chrome/browser/signin/chrome_signin_client.cc
+++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -113,7 +113,7 @@ bool ChromeSigninClient::CanRevokeCredentials() {
#if defined(OS_CHROMEOS)
// UserManager may not exist in unit_tests.
if (chromeos::UserManager::IsInitialized() &&
- chromeos::UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
+ chromeos::UserManager::Get()->IsLoggedInAsSupervisedUser()) {
// Don't allow revoking credentials for Chrome OS supervised users.
// See http://crbug.com/332032
LOG(ERROR) << "Attempt to revoke supervised user refresh "
diff --git a/chrome/browser/supervised_user/chromeos/manager_password_service.cc b/chrome/browser/supervised_user/chromeos/manager_password_service.cc
index 000911a..ece93d4f 100644
--- a/chrome/browser/supervised_user/chromeos/manager_password_service.cc
+++ b/chrome/browser/supervised_user/chromeos/manager_password_service.cc
@@ -8,8 +8,8 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
@@ -46,7 +46,7 @@ void ManagerPasswordService::Init(
const UserList& users = user_manager->GetUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
- if ((*it)->GetType() != user_manager::USER_TYPE_LOCALLY_MANAGED)
+ if ((*it)->GetType() != user_manager::USER_TYPE_SUPERVISED)
continue;
if (user_id != supervised_user_manager->GetManagerUserId((*it)->email()))
continue;
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc b/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
index ecc22e4..fed10c6 100644
--- a/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
+++ b/chrome/browser/supervised_user/chromeos/supervised_user_password_service.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_authentication.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
diff --git a/chrome/browser/supervised_user/chromeos/supervised_user_password_service_factory.cc b/chrome/browser/supervised_user/chromeos/supervised_user_password_service_factory.cc
index 415c03c..47144bc 100644
--- a/chrome/browser/supervised_user/chromeos/supervised_user_password_service_factory.cc
+++ b/chrome/browser/supervised_user/chromeos/supervised_user_password_service_factory.cc
@@ -44,7 +44,7 @@ KeyedService* SupervisedUserPasswordServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile= static_cast<Profile*>(context);
User* user = ProfileHelper::Get()->GetUserByProfile(profile);
- if (user->GetType() != user_manager::USER_TYPE_LOCALLY_MANAGED)
+ if (user->GetType() != user_manager::USER_TYPE_SUPERVISED)
return NULL;
SupervisedUserPasswordService* result = new SupervisedUserPasswordService();
result->Init(
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 3bf4c61..b0aa84a 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -407,8 +407,8 @@ ash::user::LoginStatus SystemTrayDelegateChromeOS::GetUserLoginStatus() const {
return ash::user::LOGGED_IN_RETAIL_MODE;
case LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT:
return ash::user::LOGGED_IN_PUBLIC;
- case LoginState::LOGGED_IN_USER_LOCALLY_MANAGED:
- return ash::user::LOGGED_IN_LOCALLY_MANAGED;
+ case LoginState::LOGGED_IN_USER_SUPERVISED:
+ return ash::user::LOGGED_IN_SUPERVISED;
case LoginState::LOGGED_IN_USER_KIOSK_APP:
return ash::user::LOGGED_IN_KIOSK_APP;
}
@@ -433,29 +433,28 @@ const base::string16 SystemTrayDelegateChromeOS::GetEnterpriseMessage() const {
base::UTF8ToUTF16(GetEnterpriseDomain()));
}
-const std::string SystemTrayDelegateChromeOS::GetLocallyManagedUserManager()
- const {
- if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
+const std::string SystemTrayDelegateChromeOS::GetSupervisedUserManager() const {
+ if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
return std::string();
return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayEmail(
chromeos::UserManager::Get()->GetActiveUser()->email());
}
const base::string16
-SystemTrayDelegateChromeOS::GetLocallyManagedUserManagerName() const {
- if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
+SystemTrayDelegateChromeOS::GetSupervisedUserManagerName() const {
+ if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
return base::string16();
return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayName(
chromeos::UserManager::Get()->GetActiveUser()->email());
}
-const base::string16 SystemTrayDelegateChromeOS::GetLocallyManagedUserMessage()
+const base::string16 SystemTrayDelegateChromeOS::GetSupervisedUserMessage()
const {
- if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
+ if (GetUserLoginStatus() != ash::user::LOGGED_IN_SUPERVISED)
return base::string16();
return l10n_util::GetStringFUTF16(
IDS_USER_IS_LOCALLY_MANAGED_BY_NOTICE,
- base::UTF8ToUTF16(GetLocallyManagedUserManager()));
+ base::UTF8ToUTF16(GetSupervisedUserManager()));
}
bool SystemTrayDelegateChromeOS::SystemShouldUpgrade() const {
@@ -574,7 +573,7 @@ void SystemTrayDelegateChromeOS::ShowPublicAccountInfo() {
chrome::ShowPolicy(displayer.browser());
}
-void SystemTrayDelegateChromeOS::ShowLocallyManagedUserInfo() {
+void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() {
// TODO(antrim): find out what should we show in this case.
// http://crbug.com/229762
}
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
index e5a6bf8..742a7cc 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
@@ -65,10 +65,9 @@ class SystemTrayDelegateChromeOS
virtual void ChangeProfilePicture() OVERRIDE;
virtual const std::string GetEnterpriseDomain() const OVERRIDE;
virtual const base::string16 GetEnterpriseMessage() const OVERRIDE;
- virtual const std::string GetLocallyManagedUserManager() const OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserManagerName()
- const OVERRIDE;
- virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE;
+ virtual const std::string GetSupervisedUserManager() const OVERRIDE;
+ virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE;
+ virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE;
virtual bool SystemShouldUpgrade() const OVERRIDE;
virtual base::HourClockType GetHourClockType() const OVERRIDE;
virtual void ShowSettings() OVERRIDE;
@@ -86,7 +85,7 @@ class SystemTrayDelegateChromeOS
virtual void ShowAccessibilityHelp() OVERRIDE;
virtual void ShowAccessibilitySettings() OVERRIDE;
virtual void ShowPublicAccountInfo() OVERRIDE;
- virtual void ShowLocallyManagedUserInfo() OVERRIDE;
+ virtual void ShowSupervisedUserInfo() OVERRIDE;
virtual void ShowEnterpriseInfo() OVERRIDE;
virtual void ShowUserLogin() OVERRIDE;
virtual bool ShowSpringChargerReplacementDialog() OVERRIDE;
diff --git a/chrome/browser/ui/ash/system_tray_delegate_linux.cc b/chrome/browser/ui/ash/system_tray_delegate_linux.cc
index fbe0ef0..db5e813 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_linux.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_linux.cc
@@ -71,16 +71,15 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate,
return base::string16();
}
- virtual const std::string GetLocallyManagedUserManager() const OVERRIDE {
+ virtual const std::string GetSupervisedUserManager() const OVERRIDE {
return std::string();
}
- virtual const base::string16 GetLocallyManagedUserManagerName() const
- OVERRIDE {
+ virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE {
return base::string16();
}
- virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE {
+ virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE {
return base::string16();
}
@@ -146,7 +145,7 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate,
virtual void ShowPublicAccountInfo() OVERRIDE {
}
- virtual void ShowLocallyManagedUserInfo() OVERRIDE {
+ virtual void ShowSupervisedUserInfo() OVERRIDE {
}
virtual void ShowEnterpriseInfo() OVERRIDE {
diff --git a/chrome/browser/ui/ash/system_tray_delegate_win.cc b/chrome/browser/ui/ash/system_tray_delegate_win.cc
index 041970c..0dbaa63 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_win.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_win.cc
@@ -72,16 +72,15 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate,
return base::string16();
}
- virtual const std::string GetLocallyManagedUserManager() const OVERRIDE {
+ virtual const std::string GetSupervisedUserManager() const OVERRIDE {
return std::string();
}
- virtual const base::string16 GetLocallyManagedUserManagerName() const
- OVERRIDE {
+ virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE {
return base::string16();
}
- virtual const base::string16 GetLocallyManagedUserMessage() const OVERRIDE {
+ virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE {
return base::string16();
}
@@ -144,7 +143,7 @@ class SystemTrayDelegateWin : public ash::SystemTrayDelegate,
virtual void ShowPublicAccountInfo() OVERRIDE {
}
- virtual void ShowLocallyManagedUserInfo() OVERRIDE {
+ virtual void ShowSupervisedUserInfo() OVERRIDE {
}
virtual void ShowEnterpriseInfo() OVERRIDE {
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 9fdf9a5..c2415a2 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -46,27 +46,27 @@ void UpdateAuthParams(base::DictionaryValue* params, bool has_users) {
params->SetBoolean("createAccount", allow_new_user && allow_guest);
params->SetBoolean("guestSignin", allow_guest);
- // Allow locally managed user creation only if:
+ // Allow supervised user creation only if:
// 1. Enterprise managed device > is allowed by policy.
// 2. Consumer device > owner exists.
// 3. New users are allowed by owner.
// 4. Supervised users are allowed by owner.
- bool managed_users_allowed =
- UserManager::Get()->AreLocallyManagedUsersAllowed();
- bool managed_users_can_create = true;
+ bool supervised_users_allowed =
+ UserManager::Get()->AreSupervisedUsersAllowed();
+ bool supervised_users_can_create = true;
int message_id = -1;
if (!has_users) {
- managed_users_can_create = false;
+ supervised_users_can_create = false;
message_id = IDS_CREATE_LOCALLY_MANAGED_USER_NO_MANAGER_TEXT;
}
- if (!allow_new_user || !managed_users_allowed) {
- managed_users_can_create = false;
+ if (!allow_new_user || !supervised_users_allowed) {
+ supervised_users_can_create = false;
message_id = IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_RESTRICTED_TEXT;
}
- params->SetBoolean("managedUsersEnabled", managed_users_allowed);
- params->SetBoolean("managedUsersCanCreate", managed_users_can_create);
- if (!managed_users_can_create) {
+ params->SetBoolean("managedUsersEnabled", supervised_users_allowed);
+ params->SetBoolean("managedUsersCanCreate", supervised_users_can_create);
+ if (!supervised_users_can_create) {
params->SetString("managedUsersRestrictionReason",
l10n_util::GetStringUTF16(message_id));
}
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index 6aceb48..4e2e2e0 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -26,12 +26,12 @@
#include "chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/kiosk_autolaunch_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/kiosk_enable_screen_handler.h"
-#include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
#include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h"
@@ -140,7 +140,8 @@ const char OobeUI::kScreenErrorMessage[] = "error-message";
const char OobeUI::kScreenUserImagePicker[] = "user-image";
const char OobeUI::kScreenTpmError[] = "tpm-error-message";
const char OobeUI::kScreenPasswordChanged[] = "password-changed";
-const char OobeUI::kScreenManagedUserCreationFlow[] = "managed-user-creation";
+const char OobeUI::kScreenSupervisedUserCreationFlow[] =
+ "managed-user-creation";
const char OobeUI::kScreenTermsOfService[] = "terms-of-service";
const char OobeUI::kScreenWrongHWID[] = "wrong-hwid";
const char OobeUI::kScreenAutoEnrollmentCheck[] = "auto-enrollment-check";
@@ -164,7 +165,7 @@ OobeUI::OobeUI(content::WebUI* web_ui, const GURL& url)
kiosk_enable_screen_actor_(NULL),
wrong_hwid_screen_actor_(NULL),
auto_enrollment_check_screen_actor_(NULL),
- locally_managed_user_creation_screen_actor_(NULL),
+ supervised_user_creation_screen_actor_(NULL),
error_screen_handler_(NULL),
signin_screen_handler_(NULL),
terms_of_service_screen_actor_(NULL),
@@ -215,12 +216,11 @@ OobeUI::OobeUI(content::WebUI* web_ui, const GURL& url)
kiosk_enable_screen_actor_ = kiosk_enable_screen_handler;
AddScreenHandler(kiosk_enable_screen_handler);
- LocallyManagedUserCreationScreenHandler*
- locally_managed_user_creation_screen_handler =
- new LocallyManagedUserCreationScreenHandler();
- locally_managed_user_creation_screen_actor_ =
- locally_managed_user_creation_screen_handler;
- AddScreenHandler(locally_managed_user_creation_screen_handler);
+ SupervisedUserCreationScreenHandler* supervised_user_creation_screen_handler =
+ new SupervisedUserCreationScreenHandler();
+ supervised_user_creation_screen_actor_ =
+ supervised_user_creation_screen_handler;
+ AddScreenHandler(supervised_user_creation_screen_handler);
WrongHWIDScreenHandler* wrong_hwid_screen_handler =
new WrongHWIDScreenHandler();
@@ -381,9 +381,9 @@ ErrorScreenActor* OobeUI::GetErrorScreenActor() {
return error_screen_handler_;
}
-LocallyManagedUserCreationScreenHandler*
- OobeUI::GetLocallyManagedUserCreationScreenActor() {
- return locally_managed_user_creation_screen_actor_;
+SupervisedUserCreationScreenHandler*
+ OobeUI::GetSupervisedUserCreationScreenActor() {
+ return supervised_user_creation_screen_actor_;
}
AppLaunchSplashScreenActor*
@@ -438,8 +438,8 @@ void OobeUI::InitializeScreenMaps() {
screen_names_[SCREEN_USER_IMAGE_PICKER] = kScreenUserImagePicker;
screen_names_[SCREEN_TPM_ERROR] = kScreenTpmError;
screen_names_[SCREEN_PASSWORD_CHANGED] = kScreenPasswordChanged;
- screen_names_[SCREEN_CREATE_MANAGED_USER_FLOW] =
- kScreenManagedUserCreationFlow;
+ screen_names_[SCREEN_CREATE_SUPERVISED_USER_FLOW] =
+ kScreenSupervisedUserCreationFlow;
screen_names_[SCREEN_TERMS_OF_SERVICE] = kScreenTermsOfService;
screen_names_[SCREEN_WRONG_HWID] = kScreenWrongHWID;
screen_names_[SCREEN_AUTO_ENROLLMENT_CHECK] = kScreenAutoEnrollmentCheck;
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
index 680bb4d..2dba482 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
@@ -75,7 +75,7 @@ class OobeUI : public OobeDisplay,
static const char kScreenUserImagePicker[];
static const char kScreenTpmError[];
static const char kScreenPasswordChanged[];
- static const char kScreenManagedUserCreationFlow[];
+ static const char kScreenSupervisedUserCreationFlow[];
static const char kScreenTermsOfService[];
static const char kScreenWrongHWID[];
static const char kScreenAutoEnrollmentCheck[];
@@ -105,8 +105,8 @@ class OobeUI : public OobeDisplay,
virtual WrongHWIDScreenActor* GetWrongHWIDScreenActor() OVERRIDE;
virtual AutoEnrollmentCheckScreenActor*
GetAutoEnrollmentCheckScreenActor() OVERRIDE;
- virtual LocallyManagedUserCreationScreenHandler*
- GetLocallyManagedUserCreationScreenActor() OVERRIDE;
+ virtual SupervisedUserCreationScreenHandler*
+ GetSupervisedUserCreationScreenActor() OVERRIDE;
virtual AppLaunchSplashScreenActor*
GetAppLaunchSplashScreenActor() OVERRIDE;
virtual bool IsJSReady(const base::Closure& display_is_ready_callback)
@@ -192,8 +192,8 @@ class OobeUI : public OobeDisplay,
KioskEnableScreenActor* kiosk_enable_screen_actor_;
WrongHWIDScreenActor* wrong_hwid_screen_actor_;
AutoEnrollmentCheckScreenActor* auto_enrollment_check_screen_actor_;
- LocallyManagedUserCreationScreenHandler*
- locally_managed_user_creation_screen_actor_;
+ SupervisedUserCreationScreenHandler*
+ supervised_user_creation_screen_actor_;
AppLaunchSplashScreenActor* app_launch_splash_screen_actor_;
ControllerPairingScreenActor* controller_pairing_screen_actor_;
HostPairingScreenActor* host_pairing_screen_actor_;
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index c9f8793..88063e8 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -677,7 +677,7 @@ void SigninScreenHandler::RegisterMessages() {
AddCallback("launchDemoUser", &SigninScreenHandler::HandleLaunchDemoUser);
AddCallback("launchIncognito", &SigninScreenHandler::HandleLaunchIncognito);
AddCallback("showLocallyManagedUserCreationScreen",
- &SigninScreenHandler::HandleShowLocallyManagedUserCreationScreen);
+ &SigninScreenHandler::HandleShowSupervisedUserCreationScreen);
AddCallback("launchPublicAccount",
&SigninScreenHandler::HandleLaunchPublicAccount);
AddRawCallback("offlineLogin", &SigninScreenHandler::HandleOfflineLogin);
@@ -1002,14 +1002,14 @@ void SigninScreenHandler::HandleLaunchIncognito() {
delegate_->Login(context, SigninSpecifics());
}
-void SigninScreenHandler::HandleShowLocallyManagedUserCreationScreen() {
- if (!UserManager::Get()->AreLocallyManagedUsersAllowed()) {
+void SigninScreenHandler::HandleShowSupervisedUserCreationScreen() {
+ if (!UserManager::Get()->AreSupervisedUsersAllowed()) {
LOG(ERROR) << "Managed users not allowed.";
return;
}
scoped_ptr<base::DictionaryValue> params(new base::DictionaryValue());
LoginDisplayHostImpl::default_host()->
- StartWizard(WizardController::kLocallyManagedUserCreationScreenName,
+ StartWizard(WizardController::kSupervisedUserCreationScreenName,
params.Pass());
}
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
index 9ef4719..c8232b2 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
@@ -46,8 +46,8 @@ class AuthenticatedUserEmailRetriever;
class CaptivePortalWindowProxy;
class CoreOobeActor;
class GaiaScreenHandler;
-class LocallyManagedUserCreationScreenHandler;
class NativeWindowDelegate;
+class SupervisedUserCreationScreenHandler;
class User;
class UserContext;
@@ -246,8 +246,8 @@ class SigninScreenHandler
};
friend class GaiaScreenHandler;
- friend class LocallyManagedUserCreationScreenHandler;
friend class ReportDnsCacheClearedOnUIThread;
+ friend class SupervisedUserCreationScreenHandler;
void ShowImpl();
@@ -351,7 +351,7 @@ class SigninScreenHandler
void HandleLoginScreenUpdate();
void HandleShowLoadingTimeoutError();
void HandleUpdateOfflineLogin(bool offline_login_active);
- void HandleShowLocallyManagedUserCreationScreen();
+ void HandleShowSupervisedUserCreationScreen();
void HandleFocusPod(const std::string& user_id);
void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode);
void HandleRetrieveAuthenticatedUserEmail(double attempt_token);
diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
index a09a048..5f3d36b 100644
--- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc
@@ -1,14 +1,14 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h"
+#include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h"
#include "ash/audio/sounds.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_flow.h"
#include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
+#include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/users/user_manager.h"
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
@@ -29,8 +29,7 @@ const char kJsScreenPath[] = "login.LocallyManagedUserCreationScreen";
namespace chromeos {
-LocallyManagedUserCreationScreenHandler::
-LocallyManagedUserCreationScreenHandler()
+SupervisedUserCreationScreenHandler::SupervisedUserCreationScreenHandler()
: BaseScreenHandler(kJsScreenPath),
delegate_(NULL) {
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
@@ -41,14 +40,13 @@ LocallyManagedUserCreationScreenHandler()
bundle.GetRawDataResource(IDR_SOUND_CAMERA_SNAP_WAV));
}
-LocallyManagedUserCreationScreenHandler::
- ~LocallyManagedUserCreationScreenHandler() {
+SupervisedUserCreationScreenHandler::~SupervisedUserCreationScreenHandler() {
if (delegate_) {
delegate_->OnActorDestroyed(this);
}
}
-void LocallyManagedUserCreationScreenHandler::DeclareLocalizedValues(
+void SupervisedUserCreationScreenHandler::DeclareLocalizedValues(
LocalizedValuesBuilder* builder) {
builder->Add(
"managedUserCreationFlowRetryButtonTitle",
@@ -156,60 +154,59 @@ void LocallyManagedUserCreationScreenHandler::DeclareLocalizedValues(
IDS_OPTIONS_PHOTO_DISCARD_ACCESSIBLE_TEXT);
}
-void LocallyManagedUserCreationScreenHandler::Initialize() {}
+void SupervisedUserCreationScreenHandler::Initialize() {}
-void LocallyManagedUserCreationScreenHandler::RegisterMessages() {
+void SupervisedUserCreationScreenHandler::RegisterMessages() {
AddCallback("finishLocalManagedUserCreation",
- &LocallyManagedUserCreationScreenHandler::
- HandleFinishLocalManagedUserCreation);
+ &SupervisedUserCreationScreenHandler::
+ HandleFinishLocalSupervisedUserCreation);
AddCallback("abortLocalManagedUserCreation",
- &LocallyManagedUserCreationScreenHandler::
- HandleAbortLocalManagedUserCreation);
+ &SupervisedUserCreationScreenHandler::
+ HandleAbortLocalSupervisedUserCreation);
AddCallback("checkLocallyManagedUserName",
- &LocallyManagedUserCreationScreenHandler::
- HandleCheckLocallyManagedUserName);
+ &SupervisedUserCreationScreenHandler::
+ HandleCheckSupervisedUserName);
AddCallback("authenticateManagerInLocallyManagedUserCreationFlow",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleAuthenticateManager);
AddCallback("specifyLocallyManagedUserCreationFlowUserData",
- &LocallyManagedUserCreationScreenHandler::
- HandleCreateManagedUser);
+ &SupervisedUserCreationScreenHandler::
+ HandleCreateSupervisedUser);
AddCallback("managerSelectedOnLocallyManagedUserCreationFlow",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleManagerSelected);
AddCallback("userSelectedForImportInManagedUserCreationFlow",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleImportUserSelected);
AddCallback("importSupervisedUser",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleImportSupervisedUser);
AddCallback("importSupervisedUserWithPassword",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleImportSupervisedUserWithPassword);
// TODO(antrim) : this is an explicit code duplications with UserImageScreen.
// It should be removed by issue 251179.
AddCallback("supervisedUserGetImages",
- &LocallyManagedUserCreationScreenHandler::
- HandleGetImages);
+ &SupervisedUserCreationScreenHandler::HandleGetImages);
AddCallback("supervisedUserPhotoTaken",
- &LocallyManagedUserCreationScreenHandler::HandlePhotoTaken);
+ &SupervisedUserCreationScreenHandler::HandlePhotoTaken);
AddCallback("supervisedUserTakePhoto",
- &LocallyManagedUserCreationScreenHandler::HandleTakePhoto);
+ &SupervisedUserCreationScreenHandler::HandleTakePhoto);
AddCallback("supervisedUserDiscardPhoto",
- &LocallyManagedUserCreationScreenHandler::HandleDiscardPhoto);
+ &SupervisedUserCreationScreenHandler::HandleDiscardPhoto);
AddCallback("supervisedUserSelectImage",
- &LocallyManagedUserCreationScreenHandler::HandleSelectImage);
+ &SupervisedUserCreationScreenHandler::HandleSelectImage);
AddCallback("currentSupervisedUserPage",
- &LocallyManagedUserCreationScreenHandler::
+ &SupervisedUserCreationScreenHandler::
HandleCurrentSupervisedUserPage);
}
-void LocallyManagedUserCreationScreenHandler::PrepareToShow() {}
+void SupervisedUserCreationScreenHandler::PrepareToShow() {}
-void LocallyManagedUserCreationScreenHandler::Show() {
+void SupervisedUserCreationScreenHandler::Show() {
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
scoped_ptr<base::ListValue> users_list(new base::ListValue());
const UserList& users = UserManager::Get()->GetUsers();
@@ -230,24 +227,24 @@ void LocallyManagedUserCreationScreenHandler::Show() {
users_list->Append(user_dict);
}
data->Set("managers", users_list.release());
- ShowScreen(OobeUI::kScreenManagedUserCreationFlow, data.get());
+ ShowScreen(OobeUI::kScreenSupervisedUserCreationFlow, data.get());
if (!delegate_)
return;
}
-void LocallyManagedUserCreationScreenHandler::Hide() {
+void SupervisedUserCreationScreenHandler::Hide() {
}
-void LocallyManagedUserCreationScreenHandler::ShowIntroPage() {
+void SupervisedUserCreationScreenHandler::ShowIntroPage() {
CallJS("showIntroPage");
}
-void LocallyManagedUserCreationScreenHandler::ShowManagerPasswordError() {
+void SupervisedUserCreationScreenHandler::ShowManagerPasswordError() {
CallJS("showManagerPasswordError");
}
-void LocallyManagedUserCreationScreenHandler::ShowStatusMessage(
+void SupervisedUserCreationScreenHandler::ShowStatusMessage(
bool is_progress,
const base::string16& message) {
if (is_progress)
@@ -256,49 +253,49 @@ void LocallyManagedUserCreationScreenHandler::ShowStatusMessage(
CallJS("showStatusError", message);
}
-void LocallyManagedUserCreationScreenHandler::ShowUsernamePage() {
+void SupervisedUserCreationScreenHandler::ShowUsernamePage() {
CallJS("showUsernamePage");
}
-void LocallyManagedUserCreationScreenHandler::ShowTutorialPage() {
+void SupervisedUserCreationScreenHandler::ShowTutorialPage() {
CallJS("showTutorialPage");
}
-void LocallyManagedUserCreationScreenHandler::ShowErrorPage(
+void SupervisedUserCreationScreenHandler::ShowErrorPage(
const base::string16& title,
const base::string16& message,
const base::string16& button_text) {
CallJS("showErrorPage", title, message, button_text);
}
-void LocallyManagedUserCreationScreenHandler::SetDelegate(Delegate* delegate) {
+void SupervisedUserCreationScreenHandler::SetDelegate(Delegate* delegate) {
delegate_ = delegate;
}
-void LocallyManagedUserCreationScreenHandler::
- HandleFinishLocalManagedUserCreation() {
+void SupervisedUserCreationScreenHandler::
+ HandleFinishLocalSupervisedUserCreation() {
delegate_->FinishFlow();
}
-void LocallyManagedUserCreationScreenHandler::
- HandleAbortLocalManagedUserCreation() {
+void SupervisedUserCreationScreenHandler::
+ HandleAbortLocalSupervisedUserCreation() {
delegate_->AbortFlow();
}
-void LocallyManagedUserCreationScreenHandler::HandleManagerSelected(
+void SupervisedUserCreationScreenHandler::HandleManagerSelected(
const std::string& manager_id) {
if (!delegate_)
return;
WallpaperManager::Get()->SetUserWallpaperNow(manager_id);
}
-void LocallyManagedUserCreationScreenHandler::HandleImportUserSelected(
+void SupervisedUserCreationScreenHandler::HandleImportUserSelected(
const std::string& user_id) {
if (!delegate_)
return;
}
-void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName(
+void SupervisedUserCreationScreenHandler::HandleCheckSupervisedUserName(
const base::string16& name) {
std::string user_id;
if (NULL != UserManager::Get()->GetSupervisedUserManager()->
@@ -318,7 +315,7 @@ void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName(
}
}
-void LocallyManagedUserCreationScreenHandler::HandleCreateManagedUser(
+void SupervisedUserCreationScreenHandler::HandleCreateSupervisedUser(
const base::string16& new_raw_user_name,
const std::string& new_user_password) {
if (!delegate_)
@@ -350,10 +347,10 @@ void LocallyManagedUserCreationScreenHandler::HandleCreateManagedUser(
ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
- delegate_->CreateManagedUser(new_user_name, new_user_password);
+ delegate_->CreateSupervisedUser(new_user_name, new_user_password);
}
-void LocallyManagedUserCreationScreenHandler::HandleImportSupervisedUser(
+void SupervisedUserCreationScreenHandler::HandleImportSupervisedUser(
const std::string& user_id) {
if (!delegate_)
return;
@@ -361,10 +358,10 @@ void LocallyManagedUserCreationScreenHandler::HandleImportSupervisedUser(
ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
- delegate_->ImportManagedUser(user_id);
+ delegate_->ImportSupervisedUser(user_id);
}
-void LocallyManagedUserCreationScreenHandler::
+void SupervisedUserCreationScreenHandler::
HandleImportSupervisedUserWithPassword(
const std::string& user_id,
const std::string& password) {
@@ -374,16 +371,16 @@ void LocallyManagedUserCreationScreenHandler::
ShowStatusMessage(true /* progress */, l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_CREATION_CREATION_PROGRESS_MESSAGE));
- delegate_->ImportManagedUserWithPassword(user_id, password);
+ delegate_->ImportSupervisedUserWithPassword(user_id, password);
}
-void LocallyManagedUserCreationScreenHandler::HandleAuthenticateManager(
+void SupervisedUserCreationScreenHandler::HandleAuthenticateManager(
const std::string& raw_manager_username,
const std::string& manager_password) {
const std::string manager_username =
gaia::SanitizeEmail(raw_manager_username);
- UserFlow* flow = new LocallyManagedUserCreationFlow(manager_username);
+ UserFlow* flow = new SupervisedUserCreationFlow(manager_username);
UserManager::Get()->SetUserFlow(manager_username, flow);
delegate_->AuthenticateManager(manager_username, manager_password);
@@ -391,7 +388,7 @@ void LocallyManagedUserCreationScreenHandler::HandleAuthenticateManager(
// TODO(antrim) : this is an explicit code duplications with UserImageScreen.
// It should be removed by issue 251179.
-void LocallyManagedUserCreationScreenHandler::HandleGetImages() {
+void SupervisedUserCreationScreenHandler::HandleGetImages() {
base::ListValue image_urls;
for (int i = kFirstDefaultImageIndex; i < kDefaultImagesCount; ++i) {
scoped_ptr<base::DictionaryValue> image_data(new base::DictionaryValue);
@@ -406,7 +403,7 @@ void LocallyManagedUserCreationScreenHandler::HandleGetImages() {
CallJS("setDefaultImages", image_urls);
}
-void LocallyManagedUserCreationScreenHandler::HandlePhotoTaken
+void SupervisedUserCreationScreenHandler::HandlePhotoTaken
(const std::string& image_url) {
std::string mime_type, charset, raw_data;
if (!net::DataURL::Parse(GURL(image_url), &mime_type, &charset, &raw_data))
@@ -417,37 +414,37 @@ void LocallyManagedUserCreationScreenHandler::HandlePhotoTaken
delegate_->OnPhotoTaken(raw_data);
}
-void LocallyManagedUserCreationScreenHandler::HandleTakePhoto() {
+void SupervisedUserCreationScreenHandler::HandleTakePhoto() {
ash::PlaySystemSoundIfSpokenFeedback(SOUND_CAMERA_SNAP);
}
-void LocallyManagedUserCreationScreenHandler::HandleDiscardPhoto() {
+void SupervisedUserCreationScreenHandler::HandleDiscardPhoto() {
ash::PlaySystemSoundIfSpokenFeedback(SOUND_OBJECT_DELETE);
}
-void LocallyManagedUserCreationScreenHandler::HandleSelectImage(
+void SupervisedUserCreationScreenHandler::HandleSelectImage(
const std::string& image_url,
const std::string& image_type) {
if (delegate_)
delegate_->OnImageSelected(image_type, image_url);
}
-void LocallyManagedUserCreationScreenHandler::HandleCurrentSupervisedUserPage(
+void SupervisedUserCreationScreenHandler::HandleCurrentSupervisedUserPage(
const std::string& page) {
if (delegate_)
delegate_->OnPageSelected(page);
}
-void LocallyManagedUserCreationScreenHandler::ShowPage(
+void SupervisedUserCreationScreenHandler::ShowPage(
const std::string& page) {
CallJS("showPage", page);
}
-void LocallyManagedUserCreationScreenHandler::SetCameraPresent(bool present) {
+void SupervisedUserCreationScreenHandler::SetCameraPresent(bool present) {
CallJS("setCameraPresent", present);
}
-void LocallyManagedUserCreationScreenHandler::ShowExistingManagedUsers(
+void SupervisedUserCreationScreenHandler::ShowExistingSupervisedUsers(
const base::ListValue* users) {
CallJS("setExistingManagedUsers", *users);
}
diff --git a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h
index 75c05c6..171c71b 100644
--- a/chrome/browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOCALLY_MANAGED_USER_CREATION_SCREEN_HANDLER_H_
-#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOCALLY_MANAGED_USER_CREATION_SCREEN_HANDLER_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SUPERVISED_USER_CREATION_SCREEN_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SUPERVISED_USER_CREATION_SCREEN_HANDLER_H_
#include <string>
@@ -19,7 +19,7 @@ class ListValue;
namespace chromeos {
-class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
+class SupervisedUserCreationScreenHandler : public BaseScreenHandler {
public:
class Delegate {
public:
@@ -28,18 +28,18 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
// This method is called, when actor is being destroyed. Note, if Delegate
// is destroyed earlier then it has to call SetDelegate(NULL).
virtual void OnActorDestroyed(
- LocallyManagedUserCreationScreenHandler* actor) = 0;
+ SupervisedUserCreationScreenHandler* actor) = 0;
- // Starts managed user creation flow, with manager identified by
+ // Starts supervised user creation flow, with manager identified by
// |manager_id| and |manager_password|.
virtual void AuthenticateManager(const std::string& manager_id,
const std::string& manager_password) = 0;
- // Starts managed user creation flow, with supervised user that would have
- // |display_name| and authenticated by the |managed_user_password|.
- virtual void CreateManagedUser(
+ // Starts supervised user creation flow, with supervised user that would
+ // have |display_name| and authenticated by the |supervised_user_password|.
+ virtual void CreateSupervisedUser(
const base::string16& display_name,
- const std::string& managed_user_password) = 0;
+ const std::string& supervised_user_password) = 0;
// Look up if user with name |display_name| already exist and can be
// imported. Returns user ID in |out_id|. Returns true if user was found,
@@ -47,12 +47,12 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
virtual bool FindUserByDisplayName(const base::string16& display_name,
std::string *out_id) const = 0;
- // Starts managed user import flow for user identified with |user_id|.
- virtual void ImportManagedUser(const std::string& user_id) = 0;
- // Starts managed user import flow for user identified with |user_id| and
+ // Starts supervised user import flow for user identified with |user_id|.
+ virtual void ImportSupervisedUser(const std::string& user_id) = 0;
+ // Starts supervised user import flow for user identified with |user_id| and
// additional |password|.
- virtual void ImportManagedUserWithPassword(const std::string& user_id,
- const std::string& password) = 0;
+ virtual void ImportSupervisedUserWithPassword(
+ const std::string& user_id, const std::string& password) = 0;
virtual void AbortFlow() = 0;
virtual void FinishFlow() = 0;
@@ -64,8 +64,8 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
virtual void OnPageSelected(const std::string& page) = 0;
};
- LocallyManagedUserCreationScreenHandler();
- virtual ~LocallyManagedUserCreationScreenHandler();
+ SupervisedUserCreationScreenHandler();
+ virtual ~SupervisedUserCreationScreenHandler();
virtual void PrepareToShow();
virtual void Show();
@@ -92,7 +92,7 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
void SetCameraPresent(bool enabled);
- void ShowExistingManagedUsers(const base::ListValue* users);
+ void ShowExistingSupervisedUsers(const base::ListValue* users);
// BaseScreenHandler implementation:
virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
@@ -103,19 +103,19 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
private:
// WebUI message handlers.
- void HandleCheckLocallyManagedUserName(const base::string16& name);
+ void HandleCheckSupervisedUserName(const base::string16& name);
void HandleManagerSelected(const std::string& manager_id);
void HandleImportUserSelected(const std::string& user_id);
- void HandleFinishLocalManagedUserCreation();
- void HandleAbortLocalManagedUserCreation();
- void HandleRetryLocalManagedUserCreation(const base::ListValue* args);
+ void HandleFinishLocalSupervisedUserCreation();
+ void HandleAbortLocalSupervisedUserCreation();
+ void HandleRetryLocalSupervisedUserCreation(const base::ListValue* args);
void HandleCurrentSupervisedUserPage(const std::string& current_page);
void HandleAuthenticateManager(const std::string& raw_manager_username,
const std::string& manager_password);
- void HandleCreateManagedUser(const base::string16& new_raw_user_name,
+ void HandleCreateSupervisedUser(const base::string16& new_raw_user_name,
const std::string& new_user_password);
void HandleImportSupervisedUser(const std::string& user_id);
void HandleImportSupervisedUserWithPassword(const std::string& user_id,
@@ -132,9 +132,9 @@ class LocallyManagedUserCreationScreenHandler : public BaseScreenHandler {
Delegate* delegate_;
- DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationScreenHandler);
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreationScreenHandler);
};
} // namespace chromeos
-#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOCALLY_MANAGED_USER_CREATION_SCREEN_HANDLER_H_
+#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SUPERVISED_USER_CREATION_SCREEN_HANDLER_H_
diff --git a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
index 2a23085..bb2177c 100644
--- a/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
+++ b/chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc
@@ -33,7 +33,7 @@ void AddAccountUITweaksLocalizedValues(
UserManager::Get()->IsLoggedInAsGuest());
localized_strings->SetBoolean("loggedInAsLocallyManagedUser",
- UserManager::Get()->IsLoggedInAsLocallyManagedUser());
+ UserManager::Get()->IsLoggedInAsSupervisedUser());
localized_strings->SetBoolean("loggedInAsPublicAccount",
UserManager::Get()->IsLoggedInAsPublicAccount());
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 59c08be..57951d4 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -901,7 +901,7 @@ void BrowserOptionsHandler::InitializePage() {
g_browser_process->platform_part()->browser_policy_connector_chromeos();
if (!connector->IsEnterpriseManaged() &&
!chromeos::UserManager::Get()->IsLoggedInAsGuest() &&
- !chromeos::UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
+ !chromeos::UserManager::Get()->IsLoggedInAsSupervisedUser()) {
web_ui()->CallJavascriptFunction(
"BrowserOptions.enableFactoryResetSection");
}
diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi
index 4ede722..933e127 100644
--- a/chrome/chrome_browser_chromeos.gypi
+++ b/chrome/chrome_browser_chromeos.gypi
@@ -565,22 +565,6 @@
'browser/chromeos/login/login_utils.cc',
'browser/chromeos/login/login_utils.h',
'browser/chromeos/login/login_wizard.h',
- 'browser/chromeos/login/managed/locally_managed_user_constants.cc',
- 'browser/chromeos/login/managed/locally_managed_user_constants.h',
- 'browser/chromeos/login/managed/locally_managed_user_creation_flow.cc',
- 'browser/chromeos/login/managed/locally_managed_user_creation_flow.h',
- 'browser/chromeos/login/managed/locally_managed_user_creation_screen.cc',
- 'browser/chromeos/login/managed/locally_managed_user_creation_screen.h',
- 'browser/chromeos/login/managed/managed_user_authenticator.cc',
- 'browser/chromeos/login/managed/managed_user_authenticator.h',
- 'browser/chromeos/login/managed/managed_user_creation_controller.cc',
- 'browser/chromeos/login/managed/managed_user_creation_controller.h',
- 'browser/chromeos/login/managed/managed_user_creation_controller_new.cc',
- 'browser/chromeos/login/managed/managed_user_creation_controller_new.h',
- 'browser/chromeos/login/managed/supervised_user_authentication.cc',
- 'browser/chromeos/login/managed/supervised_user_authentication.h',
- 'browser/chromeos/login/managed/supervised_user_login_flow.cc',
- 'browser/chromeos/login/managed/supervised_user_login_flow.h',
'browser/chromeos/login/profile_auth_data.cc',
'browser/chromeos/login/profile_auth_data.h',
'browser/chromeos/login/proxy_settings_dialog.h',
@@ -682,6 +666,22 @@
'browser/chromeos/login/signin_specifics.h',
'browser/chromeos/login/startup_utils.cc',
'browser/chromeos/login/startup_utils.h',
+ 'browser/chromeos/login/supervised/supervised_user_authentication.cc',
+ 'browser/chromeos/login/supervised/supervised_user_authentication.h',
+ 'browser/chromeos/login/supervised/supervised_user_authenticator.cc',
+ 'browser/chromeos/login/supervised/supervised_user_authenticator.h',
+ 'browser/chromeos/login/supervised/supervised_user_creation_controller.cc',
+ 'browser/chromeos/login/supervised/supervised_user_creation_controller.h',
+ 'browser/chromeos/login/supervised/supervised_user_creation_controller_new.cc',
+ 'browser/chromeos/login/supervised/supervised_user_creation_controller_new.h',
+ 'browser/chromeos/login/supervised/supervised_user_constants.cc',
+ 'browser/chromeos/login/supervised/supervised_user_constants.h',
+ 'browser/chromeos/login/supervised/supervised_user_creation_flow.cc',
+ 'browser/chromeos/login/supervised/supervised_user_creation_flow.h',
+ 'browser/chromeos/login/supervised/supervised_user_creation_screen.cc',
+ 'browser/chromeos/login/supervised/supervised_user_creation_screen.h',
+ 'browser/chromeos/login/supervised/supervised_user_login_flow.cc',
+ 'browser/chromeos/login/supervised/supervised_user_login_flow.h',
'browser/chromeos/login/ui/captive_portal_view.cc',
'browser/chromeos/login/ui/captive_portal_view.h',
'browser/chromeos/login/ui/captive_portal_window_proxy.cc',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 7aa4400..44c17ec 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -964,8 +964,6 @@
'browser/ui/webui/chromeos/login/kiosk_autolaunch_screen_handler.h',
'browser/ui/webui/chromeos/login/kiosk_enable_screen_handler.cc',
'browser/ui/webui/chromeos/login/kiosk_enable_screen_handler.h',
- 'browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.cc',
- 'browser/ui/webui/chromeos/login/locally_managed_user_creation_screen_handler.h',
'browser/ui/webui/chromeos/login/network_dropdown.cc',
'browser/ui/webui/chromeos/login/network_dropdown.h',
'browser/ui/webui/chromeos/login/network_dropdown_handler.cc',
@@ -986,6 +984,8 @@
'browser/ui/webui/chromeos/login/screen_manager_handler.h',
'browser/ui/webui/chromeos/login/signin_screen_handler.cc',
'browser/ui/webui/chromeos/login/signin_screen_handler.h',
+ 'browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.cc',
+ 'browser/ui/webui/chromeos/login/supervised_user_creation_screen_handler.h',
'browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc',
'browser/ui/webui/chromeos/login/terms_of_service_screen_handler.h',
'browser/ui/webui/chromeos/login/update_screen_handler.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 67ea75e..9728022 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -951,10 +951,6 @@
'browser/chromeos/login/login_utils_browsertest.cc',
'browser/chromeos/login/login_manager_test.cc',
'browser/chromeos/login/login_manager_test.h',
- 'browser/chromeos/login/managed/managed_user_creation_browsertest.cc',
- 'browser/chromeos/login/managed/managed_user_password_browsertest.cc',
- 'browser/chromeos/login/managed/managed_user_test_base.cc',
- 'browser/chromeos/login/managed/managed_user_test_base.h',
'browser/chromeos/login/oobe_localization_browsertest.cc',
'browser/chromeos/login/reset_browsertest.cc',
'browser/chromeos/login/saml/saml_browsertest.cc',
@@ -971,6 +967,10 @@
'browser/chromeos/login/screens/mock_update_screen.h',
'browser/chromeos/login/screens/network_screen_browsertest.cc',
'browser/chromeos/login/screens/update_screen_browsertest.cc',
+ 'browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc',
+ 'browser/chromeos/login/supervised/supervised_user_password_browsertest.cc',
+ 'browser/chromeos/login/supervised/supervised_user_test_base.cc',
+ 'browser/chromeos/login/supervised/supervised_user_test_base.h',
'browser/chromeos/login/signin/oauth2_browsertest.cc',
'browser/chromeos/login/test/app_window_waiter.cc',
'browser/chromeos/login/test/app_window_waiter.h',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 7b49942..d329b60 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -782,10 +782,10 @@
'browser/chromeos/login/auth/parallel_authenticator_unittest.cc',
'browser/chromeos/login/existing_user_controller_auto_login_unittest.cc',
'browser/chromeos/login/hwid_checker_unittest.cc',
- 'browser/chromeos/login/managed/supervised_user_authentication_unittest.cc',
'browser/chromeos/login/saml/saml_offline_signin_limiter_unittest.cc',
'browser/chromeos/login/screens/screen_context_unittest.cc',
'browser/chromeos/login/signin/merge_session_load_page_unittest.cc',
+ 'browser/chromeos/login/supervised/supervised_user_authentication_unittest.cc',
'browser/chromeos/login/users/multi_profile_user_controller_unittest.cc',
'browser/chromeos/login/users/user_manager_unittest.cc',
'browser/chromeos/login/users/wallpaper/wallpaper_manager_unittest.cc',
@@ -2755,7 +2755,7 @@
}],
['enable_managed_users!=1', {
'sources/': [
- ['exclude', '^browser/managed_mode/'],
+ ['exclude', '^browser/supervised_user/'],
],
}],
['safe_browsing!=1', {
diff --git a/chromeos/login/login_state.cc b/chromeos/login/login_state.cc
index 14dbce9..eba009a 100644
--- a/chromeos/login/login_state.cc
+++ b/chromeos/login/login_state.cc
@@ -99,7 +99,7 @@ bool LoginState::IsGuestUser() const {
case LOGGED_IN_USER_NONE:
case LOGGED_IN_USER_REGULAR:
case LOGGED_IN_USER_OWNER:
- case LOGGED_IN_USER_LOCALLY_MANAGED:
+ case LOGGED_IN_USER_SUPERVISED:
case LOGGED_IN_USER_KIOSK_APP:
return false;
case LOGGED_IN_USER_GUEST:
@@ -125,7 +125,7 @@ bool LoginState::UserHasNetworkProfile() const {
bool LoginState::IsUserAuthenticated() const {
return logged_in_user_type_ == LOGGED_IN_USER_REGULAR ||
logged_in_user_type_ == LOGGED_IN_USER_OWNER ||
- logged_in_user_type_ == LOGGED_IN_USER_LOCALLY_MANAGED;
+ logged_in_user_type_ == LOGGED_IN_USER_SUPERVISED;
}
bool LoginState::IsUserGaiaAuthenticated() const {
diff --git a/chromeos/login/login_state.h b/chromeos/login/login_state.h
index 5f60f63..7ab7666 100644
--- a/chromeos/login/login_state.h
+++ b/chromeos/login/login_state.h
@@ -27,7 +27,7 @@ class CHROMEOS_EXPORT LoginState {
LOGGED_IN_USER_GUEST, // A guest is logged in (i.e. incognito)
LOGGED_IN_USER_RETAIL_MODE, // Is in retail mode
LOGGED_IN_USER_PUBLIC_ACCOUNT, // A public account is logged in
- LOGGED_IN_USER_LOCALLY_MANAGED, // A locally managed user is logged in
+ LOGGED_IN_USER_SUPERVISED, // A supervised user is logged in
LOGGED_IN_USER_KIOSK_APP // Is in kiosk app mode
};
@@ -85,7 +85,7 @@ class CHROMEOS_EXPORT LoginState {
bool IsUserAuthenticated() const;
// Returns true if the user is authenticated by logging into Google account
- // (i.e., non public nor locally managed account).
+ // (i.e., non public nor supervised account).
bool IsUserGaiaAuthenticated() const;
void set_always_logged_in(bool always_logged_in) {
diff --git a/chromeos/login/user_names.cc b/chromeos/login/user_names.cc
index f8964f9..df3be0f 100644
--- a/chromeos/login/user_names.cc
+++ b/chromeos/login/user_names.cc
@@ -16,7 +16,7 @@ const char* kSignInUser = "sign-in-user-id";
// Should match cros constant in platform/libchromeos/chromeos/cryptohome.h
const char* kGuestUserName = "$guest";
-const char* kLocallyManagedUserDomain = "locally-managed.localhost";
+const char* kSupervisedUserDomain = "locally-managed.localhost";
const char* kRetailModeUserName = "demouser@";
diff --git a/chromeos/login/user_names.h b/chromeos/login/user_names.h
index 4c296f7..41bdff0 100644
--- a/chromeos/login/user_names.h
+++ b/chromeos/login/user_names.h
@@ -27,8 +27,8 @@ CHROMEOS_EXPORT extern const char* kSignInUser;
// Username for Guest session user.
CHROMEOS_EXPORT extern const char* kGuestUserName;
-// Domain that is used for all locally managed users.
-CHROMEOS_EXPORT extern const char* kLocallyManagedUserDomain;
+// Domain that is used for all supervised users.
+CHROMEOS_EXPORT extern const char* kSupervisedUserDomain;
// The retail mode user has a magic, domainless e-mail address.
CHROMEOS_EXPORT extern const char* kRetailModeUserName;
diff --git a/components/user_manager/user_type.h b/components/user_manager/user_type.h
index 520e80d..e69c316 100644
--- a/components/user_manager/user_type.h
+++ b/components/user_manager/user_type.h
@@ -21,9 +21,8 @@ USER_MANAGER_EXPORT typedef enum {
// Public account user, logs in without authentication. Available only if
// enabled through policy.
USER_TYPE_PUBLIC_ACCOUNT = 3,
- // Supervised (aka locally managed) user, logs in only with local
- // authentication.
- USER_TYPE_LOCALLY_MANAGED = 4,
+ // Supervised user, logs in only with local authentication.
+ USER_TYPE_SUPERVISED = 4,
// Kiosk app robot, logs in without authentication.
USER_TYPE_KIOSK_APP = 5,
// Maximum histogram value.