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

Side by Side Diff: chrome/browser/ui/webui/policy_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/policy_ui.h" 5 #include "chrome/browser/ui/webui/policy_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 source->AddLocalizedString("hideExpandedValue", 112 source->AddLocalizedString("hideExpandedValue",
113 IDS_POLICY_HIDE_EXPANDED_VALUE); 113 IDS_POLICY_HIDE_EXPANDED_VALUE);
114 source->AddLocalizedString("scopeUser", IDS_POLICY_SCOPE_USER); 114 source->AddLocalizedString("scopeUser", IDS_POLICY_SCOPE_USER);
115 source->AddLocalizedString("scopeDevice", IDS_POLICY_SCOPE_DEVICE); 115 source->AddLocalizedString("scopeDevice", IDS_POLICY_SCOPE_DEVICE);
116 source->AddLocalizedString("levelRecommended", IDS_POLICY_LEVEL_RECOMMENDED); 116 source->AddLocalizedString("levelRecommended", IDS_POLICY_LEVEL_RECOMMENDED);
117 source->AddLocalizedString("levelMandatory", IDS_POLICY_LEVEL_MANDATORY); 117 source->AddLocalizedString("levelMandatory", IDS_POLICY_LEVEL_MANDATORY);
118 source->AddLocalizedString("ok", IDS_POLICY_OK); 118 source->AddLocalizedString("ok", IDS_POLICY_OK);
119 source->AddLocalizedString("unset", IDS_POLICY_UNSET); 119 source->AddLocalizedString("unset", IDS_POLICY_UNSET);
120 source->AddLocalizedString("unknown", IDS_POLICY_UNKNOWN); 120 source->AddLocalizedString("unknown", IDS_POLICY_UNKNOWN);
121 121
122 source->SetUseJsonJSFormatV2();
123 source->SetJsonPath("strings.js"); 122 source->SetJsonPath("strings.js");
124 123
125 // Add required resources. 124 // Add required resources.
126 source->AddResourcePath("policy.css", IDR_POLICY_CSS); 125 source->AddResourcePath("policy.css", IDR_POLICY_CSS);
127 source->AddResourcePath("policy.js", IDR_POLICY_JS); 126 source->AddResourcePath("policy.js", IDR_POLICY_JS);
128 source->AddResourcePath("uber_utils.js", IDR_UBER_UTILS_JS); 127 source->AddResourcePath("uber_utils.js", IDR_UBER_UTILS_JS);
129 source->SetDefaultResource(IDR_POLICY_HTML); 128 source->SetDefaultResource(IDR_POLICY_HTML);
130 129
131 return source; 130 return source;
132 } 131 }
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 } 788 }
790 789
791 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { 790 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) {
792 web_ui->AddMessageHandler(new PolicyUIHandler); 791 web_ui->AddMessageHandler(new PolicyUIHandler);
793 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), 792 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui),
794 CreatePolicyUIHTMLSource()); 793 CreatePolicyUIHTMLSource());
795 } 794 }
796 795
797 PolicyUI::~PolicyUI() { 796 PolicyUI::~PolicyUI() {
798 } 797 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698