Chromium Code Reviews| Index: chrome/browser/chromeos/legacy_retail_mode_detector.h |
| diff --git a/chrome/browser/chromeos/legacy_retail_mode_detector.h b/chrome/browser/chromeos/legacy_retail_mode_detector.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..85229c912885d4d1edcf6219221ae83103865c29 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/legacy_retail_mode_detector.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2012 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_LEGACY_RETAIL_MODE_DETECTOR_H_ |
| +#define CHROME_BROWSER_CHROMEOS_LEGACY_RETAIL_MODE_DETECTOR_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/chromeos/settings/device_settings_service.h" |
| + |
| +namespace base { |
| +template <typename T> |
| +struct DefaultLazyInstanceTraits; |
| +} |
| + |
| +namespace chromeos { |
| + |
| +// This class detects if a device is enrolled in the legacy retail mode. |
| +class LegacyRetailModeDetector { |
| + public: |
| + static LegacyRetailModeDetector* Get(); |
| + |
| + // This method checks if Kiosk Mode is enabled or not. |
|
bartfab (slow)
2014/11/27 16:25:47
What kiosk mode is this talking about? We have a C
rkc
2014/12/01 19:15:04
This entire file is gone.
|
| + virtual bool IsKioskModeEnabled(); |
| + |
| + protected: |
| + // Needed here so MockKioskModeSettings can inherit from us. |
| + LegacyRetailModeDetector(); |
| + virtual ~LegacyRetailModeDetector(); |
|
bartfab (slow)
2014/11/27 16:25:47
Nit: Use |override|, not |virtual|.
rkc
2014/12/01 19:15:04
Acknowledged.
|
| + |
| + private: |
| + friend struct base::DefaultLazyInstanceTraits<LegacyRetailModeDetector>; |
| + friend class KioskModeSettingsTest; |
| + |
| + // Makes sure the browser will switch to kiosk mode if cryptohome was not |
|
bartfab (slow)
2014/11/27 16:25:47
As above - "kiosk mode" is not the right term here
rkc
2014/12/01 19:15:04
Acknowledged.
|
| + // ready when the browser was starting after a machine reboot. |
| + void VerifyModeIsKnown(DeviceSettingsService::OwnershipStatus status); |
| + |
| + bool is_kiosk_mode_; |
|
bartfab (slow)
2014/11/27 16:25:47
As above - "kiosk mode" is not the right term here
rkc
2014/12/01 19:15:04
Acknowledged.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(LegacyRetailModeDetector); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_LEGACY_RETAIL_MODE_DETECTOR_H_ |