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

Unified Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 742513006: Add ManagementMode enum and GetManagementMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing POLICY_EXPORT 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/settings/device_settings_provider.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.cc b/chrome/browser/chromeos/settings/device_settings_provider.cc
index b330639e01b76f54452cc23036c75d048a9c7636..7c2196f563169d377d386ca0f534efcb83240d41 100644
--- a/chrome/browser/chromeos/settings/device_settings_provider.cc
+++ b/chrome/browser/chromeos/settings/device_settings_provider.cc
@@ -25,6 +25,7 @@
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/settings/cros_settings_names.h"
+#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "policy/proto/device_management_backend.pb.h"
using google::protobuf::RepeatedField;
@@ -614,8 +615,10 @@ void DeviceSettingsProvider::UpdateValuesCache(
// If the device is not managed, or is consumer-managed, we set the device
// owner value.
if (policy_data.has_username() &&
- (!policy_data.has_request_token() ||
- policy_data.management_mode() == em::PolicyData::CONSUMER_MANAGED)) {
+ (policy::GetManagementMode(policy_data) ==
+ policy::MANAGEMENT_MODE_LOCAL_OWNER ||
+ policy::GetManagementMode(policy_data) ==
+ policy::MANAGEMENT_MODE_CONSUMER_MANAGED)) {
new_values_cache.SetString(kDeviceOwner, policy_data.username());
}
« no previous file with comments | « chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698