Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/screens/base_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" | 8 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" |
| 9 #include "chrome/browser/chromeos/login/screens/model_view_channel.h" | 9 #include "chrome/browser/chromeos/login/screens/model_view_channel.h" |
| 10 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | |
| 10 | 11 |
| 11 namespace chromeos { | 12 namespace chromeos { |
| 12 | 13 |
| 13 BaseScreen::ContextEditor::ContextEditor(BaseScreen& screen) | 14 BaseScreen::ContextEditor::ContextEditor(BaseScreen& screen) |
| 14 : screen_(screen), context_(screen.context_) { | 15 : screen_(screen), context_(screen.context_) { |
| 15 } | 16 } |
| 16 | 17 |
| 17 BaseScreen::ContextEditor::~ContextEditor() { | 18 BaseScreen::ContextEditor::~ContextEditor() { |
| 18 screen_.CommitContextChanges(); | 19 screen_.CommitContextChanges(); |
| 19 } | 20 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 return ContextEditor(*this); | 119 return ContextEditor(*this); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void BaseScreen::OnContextChanged(const base::DictionaryValue& diff) { | 122 void BaseScreen::OnContextChanged(const base::DictionaryValue& diff) { |
| 122 std::vector<::login::ScreenContext::KeyType> keys; | 123 std::vector<::login::ScreenContext::KeyType> keys; |
| 123 context_.ApplyChanges(diff, &keys); | 124 context_.ApplyChanges(diff, &keys); |
| 124 for (const auto& key : keys) | 125 for (const auto& key : keys) |
| 125 OnContextKeyUpdated(key); | 126 OnContextKeyUpdated(key); |
| 126 } | 127 } |
| 127 | 128 |
| 129 bool BaseScreen::UsingHandsOffEnrollment() { | |
|
xiyuan
2017/05/09 22:03:52
This does not feel belong here. Can we put it some
kumarniranjan
2017/05/09 22:49:47
Done.
| |
| 130 return policy::DeviceCloudPolicyManagerChromeOS:: | |
| 131 GetZeroTouchEnrollmentMode() == | |
| 132 policy::ZeroTouchEnrollmentMode::HANDS_OFF; | |
| 133 } | |
| 134 | |
| 128 } // namespace chromeos | 135 } // namespace chromeos |
| OLD | NEW |