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

Unified Diff: chrome/browser/ui/webui/policy_ui.cc

Issue 1052943002: Added device naming information to chrome://policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed IOS whitelist Created 5 years, 8 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
« no previous file with comments | « chrome/browser/resources/policy.js ('k') | components/policy_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui.cc
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index 50bf8deaa49097e6818243a26c4cad1ffa3e796a..00a2b35ec0239d8ab21cdbf2c5bd17563d57e1e4 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -90,6 +90,10 @@ content::WebUIDataSource* CreatePolicyUIHTMLSource() {
source->AddLocalizedString("labelDomain", IDS_POLICY_LABEL_DOMAIN);
source->AddLocalizedString("labelUsername", IDS_POLICY_LABEL_USERNAME);
source->AddLocalizedString("labelClientId", IDS_POLICY_LABEL_CLIENT_ID);
+ source->AddLocalizedString("labelAssetId", IDS_POLICY_LABEL_ASSET_ID);
+ source->AddLocalizedString("labelLocation", IDS_POLICY_LABEL_LOCATION);
+ source->AddLocalizedString("labelDirectoryApiId",
+ IDS_POLICY_LABEL_DIRECTORY_API_ID);
source->AddLocalizedString("labelTimeSinceLastRefresh",
IDS_POLICY_LABEL_TIME_SINCE_LAST_REFRESH);
source->AddLocalizedString("labelRefreshInterval",
@@ -113,6 +117,7 @@ content::WebUIDataSource* CreatePolicyUIHTMLSource() {
source->AddLocalizedString("ok", IDS_POLICY_OK);
source->AddLocalizedString("unset", IDS_POLICY_UNSET);
source->AddLocalizedString("unknown", IDS_POLICY_UNKNOWN);
+ source->AddLocalizedString("notSpecified", IDS_POLICY_NOT_SPECIFIED);
source->SetJsonPath("strings.js");
@@ -168,6 +173,14 @@ void GetStatusFromCore(const policy::CloudPolicyCore* core,
const em::PolicyData* policy = store->policy();
std::string client_id = policy ? policy->device_id() : std::string();
std::string username = policy ? policy->username() : std::string();
+
+ if (policy && policy->has_annotated_asset_id())
+ dict->SetString("assetId", policy->annotated_asset_id());
+ if (policy && policy->has_annotated_location())
+ dict->SetString("location", policy->annotated_location());
+ if (policy && policy->has_directory_api_id())
+ dict->SetString("directoryApiId", policy->directory_api_id());
+
base::TimeDelta refresh_interval =
base::TimeDelta::FromMilliseconds(refresh_scheduler ?
refresh_scheduler->refresh_delay() :
« no previous file with comments | « chrome/browser/resources/policy.js ('k') | components/policy_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698