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

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

Issue 1240283002: Implementation of the device attributes API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extension_api
Patch Set: Fixed build. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
index 3d98421a3b595caada20b4d952cb9fdc76770617..7005f7f2b3e14715906ea2abf351285fa63c4a47 100644
--- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
+++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -261,6 +261,16 @@ std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() {
return std::string();
}
+std::string BrowserPolicyConnectorChromeOS::GetDirectoryApiID() {
+ if (device_cloud_policy_manager_) {
+ const enterprise_management::PolicyData* policy =
+ device_cloud_policy_manager_->device_store()->policy();
+ if (policy && policy->has_directory_api_id())
+ return policy->directory_api_id();
+ }
+ return std::string();
+}
+
DeviceMode BrowserPolicyConnectorChromeOS::GetDeviceMode() {
return install_attributes_ ? install_attributes_->GetMode()
: DEVICE_MODE_NOT_SET;

Powered by Google App Engine
This is Rietveld 408576698