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

Unified Diff: chrome/browser/chromeos/policy/policy_util.cc

Issue 742513006: Add ManagementMode enum and GetManagementMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/policy_util.cc
diff --git a/chrome/browser/chromeos/policy/policy_util.cc b/chrome/browser/chromeos/policy/policy_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d980e9e26f51cb5a9b196a752066d84385cd074b
--- /dev/null
+++ b/chrome/browser/chromeos/policy/policy_util.cc
@@ -0,0 +1,20 @@
+// 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/policy/policy_util.h"
+
+namespace em = enterprise_management;
+
+namespace policy {
+
+em::PolicyData::ManagementMode GetManagementMode(
+ const em::PolicyData& policy_data) {
+ if (policy_data.has_management_mode())
+ return policy_data.management_mode();
+ if (policy_data.has_request_token())
+ return em::PolicyData::ENTERPRISE_MANAGED;
+ return em::PolicyData::LOCAL_OWNER;
+}
+
+} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698