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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_screen.cc

Issue 2602973002: Add Active Directory password change screen. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 22 matching lines...) Expand all
33 "arc-tos", // SCREEN_ARC_TERMS_OF_SERVICE 33 "arc-tos", // SCREEN_ARC_TERMS_OF_SERVICE
34 "wrong-hwid", // SCREEN_WRONG_HWID 34 "wrong-hwid", // SCREEN_WRONG_HWID
35 "auto-enrollment-check", // SCREEN_AUTO_ENROLLMENT_CHECK 35 "auto-enrollment-check", // SCREEN_AUTO_ENROLLMENT_CHECK
36 "app-launch-splash", // SCREEN_APP_LAUNCH_SPLASH 36 "app-launch-splash", // SCREEN_APP_LAUNCH_SPLASH
37 "confirm-password", // SCREEN_CONFIRM_PASSWORD 37 "confirm-password", // SCREEN_CONFIRM_PASSWORD
38 "fatal-error", // SCREEN_FATAL_ERROR 38 "fatal-error", // SCREEN_FATAL_ERROR
39 "controller-pairing", // SCREEN_OOBE_CONTROLLER_PAIRING 39 "controller-pairing", // SCREEN_OOBE_CONTROLLER_PAIRING
40 "host-pairing", // SCREEN_OOBE_HOST_PAIRING 40 "host-pairing", // SCREEN_OOBE_HOST_PAIRING
41 "device-disabled", // SCREEN_DEVICE_DISABLED 41 "device-disabled", // SCREEN_DEVICE_DISABLED
42 "unrecoverable-cryptohome-error", // SCREEN_UNRECOVERABLE_CRYPTOHOME_ERROR 42 "unrecoverable-cryptohome-error", // SCREEN_UNRECOVERABLE_CRYPTOHOME_ERROR
43 "ad-password-change",
44 // SCREEN_ACTIVE_DIRECTORY_PASSWORD_CHANGE
michaelpg 2017/01/11 22:09:15 place comment above line (and indented the same as
Roman Sorokin (ftl) 2017/01/12 12:38:50 Done.
43 "unknown", // SCREEN_UNKNOWN 45 "unknown", // SCREEN_UNKNOWN
44 }; 46 };
45 47
46 static_assert(static_cast<size_t>(OobeScreen::SCREEN_UNKNOWN) == 48 static_assert(static_cast<size_t>(OobeScreen::SCREEN_UNKNOWN) ==
47 arraysize(kScreenNames) - 1, 49 arraysize(kScreenNames) - 1,
48 "Missing element in OobeScreen or kScreenNames"); 50 "Missing element in OobeScreen or kScreenNames");
49 51
50 } // namespace 52 } // namespace
51 53
52 std::string GetOobeScreenName(OobeScreen screen) { 54 std::string GetOobeScreenName(OobeScreen screen) {
53 DCHECK(screen <= OobeScreen::SCREEN_UNKNOWN); 55 DCHECK(screen <= OobeScreen::SCREEN_UNKNOWN);
54 return kScreenNames[static_cast<size_t>(screen)]; 56 return kScreenNames[static_cast<size_t>(screen)];
55 } 57 }
56 58
57 OobeScreen GetOobeScreenFromName(const std::string& name) { 59 OobeScreen GetOobeScreenFromName(const std::string& name) {
58 for (size_t i = 0; i < arraysize(kScreenNames); ++i) { 60 for (size_t i = 0; i < arraysize(kScreenNames); ++i) {
59 if (name == kScreenNames[i]) 61 if (name == kScreenNames[i])
60 return static_cast<OobeScreen>(i); 62 return static_cast<OobeScreen>(i);
61 } 63 }
62 64
63 return OobeScreen::SCREEN_UNKNOWN; 65 return OobeScreen::SCREEN_UNKNOWN;
64 } 66 }
65 67
66 } // namespace chromeos 68 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698