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

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

Issue 1348903007: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/ui/webui/policy_ui.cc
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index 7c646e0d19260c0b6334bdd109a985c91ffc81bf..03d43485804641fe4dced0da2ec12c88bcb51905 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "chrome/browser/ui/webui/policy_ui.h"
-
-#include <stddef.h>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -12,7 +10,7 @@
#include "base/compiler_specific.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
-#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
@@ -79,28 +77,6 @@
namespace {
-struct PolicySourceMap {
- const char* key;
- int string_id;
-};
-
-// Strings that map from PolicySource enum to i18n string keys and their IDs.
-const PolicySourceMap kPolicySources[policy::POLICY_SOURCE_COUNT] = {
- {"sourceEnterpriseDefault", IDS_POLICY_SOURCE_ENTERPRISE_DEFAULT},
- {"sourceCloud", IDS_POLICY_SOURCE_CLOUD},
- {"sourceEnterpriseOverride", IDS_POLICY_SOURCE_ENTERPRISE_OVERRIDE},
- {"sourcePlatform", IDS_POLICY_SOURCE_PLATFORM}
-};
-
-void AddLocalizedPoilcySourceStrings(content::WebUIDataSource* source) {
- DCHECK_EQ(static_cast<size_t>(policy::POLICY_SOURCE_COUNT),
- arraysize(kPolicySources));
- for (size_t i = 0; i < arraysize(kPolicySources); ++i) {
- source->AddLocalizedString(kPolicySources[i].key,
- kPolicySources[i].string_id);
- }
-}
-
content::WebUIDataSource* CreatePolicyUIHTMLSource() {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIPolicyHost);
@@ -132,7 +108,6 @@
source->AddLocalizedString("headerName", IDS_POLICY_HEADER_NAME);
source->AddLocalizedString("headerValue", IDS_POLICY_HEADER_VALUE);
source->AddLocalizedString("headerStatus", IDS_POLICY_HEADER_STATUS);
- source->AddLocalizedString("headerSource", IDS_POLICY_HEADER_SOURCE);
source->AddLocalizedString("showExpandedValue",
IDS_POLICY_SHOW_EXPANDED_VALUE);
source->AddLocalizedString("hideExpandedValue",
@@ -145,7 +120,6 @@
source->AddLocalizedString("unset", IDS_POLICY_UNSET);
source->AddLocalizedString("unknown", IDS_POLICY_UNKNOWN);
source->AddLocalizedString("notSpecified", IDS_POLICY_NOT_SPECIFIED);
- AddLocalizedPoilcySourceStrings(source);
source->SetJsonPath("strings.js");
@@ -778,7 +752,6 @@
value->SetString("level", "recommended");
else
value->SetString("level", "mandatory");
- value->SetString("source", kPolicySources[entry->second.source].key);
base::string16 error = errors->GetErrors(entry->first);
if (!error.empty())
value->SetString("error", error);
« no previous file with comments | « chrome/browser/ui/webui/options/preferences_browsertest.cc ('k') | chrome/browser/ui/webui/policy_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698