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

Side by Side Diff: chrome/browser/ui/webui/certificate_viewer_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/certificate_viewer_ui.h" 5 #include "chrome/browser/ui/webui/certificate_viewer_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/certificate_viewer_webui.h" 8 #include "chrome/browser/ui/webui/certificate_viewer_webui.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_ui.h" 13 #include "content/public/browser/web_ui.h"
14 #include "content/public/browser/web_ui_data_source.h" 14 #include "content/public/browser/web_ui_data_source.h"
15 #include "grit/browser_resources.h" 15 #include "grit/browser_resources.h"
16 #include "ui/web_dialogs/web_dialog_delegate.h" 16 #include "ui/web_dialogs/web_dialog_delegate.h"
17 17
18 namespace { 18 namespace {
19 19
20 content::WebUIDataSource* GetWebUIDataSource(const std::string& host) { 20 content::WebUIDataSource* GetWebUIDataSource(const std::string& host) {
21 content::WebUIDataSource* html_source = 21 content::WebUIDataSource* html_source =
22 content::WebUIDataSource::Create(host); 22 content::WebUIDataSource::Create(host);
23 23
24 // Localized strings. 24 // Localized strings.
25 html_source->SetUseJsonJSFormatV2();
26 html_source->AddLocalizedString("general", IDS_CERT_INFO_GENERAL_TAB_LABEL); 25 html_source->AddLocalizedString("general", IDS_CERT_INFO_GENERAL_TAB_LABEL);
27 html_source->AddLocalizedString("details", IDS_CERT_INFO_DETAILS_TAB_LABEL); 26 html_source->AddLocalizedString("details", IDS_CERT_INFO_DETAILS_TAB_LABEL);
28 html_source->AddLocalizedString("close", IDS_CLOSE); 27 html_source->AddLocalizedString("close", IDS_CLOSE);
29 html_source->AddLocalizedString("export", 28 html_source->AddLocalizedString("export",
30 IDS_CERT_DETAILS_EXPORT_CERTIFICATE); 29 IDS_CERT_DETAILS_EXPORT_CERTIFICATE);
31 html_source->AddLocalizedString("usages", 30 html_source->AddLocalizedString("usages",
32 IDS_CERT_INFO_VERIFIED_USAGES_GROUP); 31 IDS_CERT_INFO_VERIFIED_USAGES_GROUP);
33 html_source->AddLocalizedString("issuedTo", IDS_CERT_INFO_SUBJECT_GROUP); 32 html_source->AddLocalizedString("issuedTo", IDS_CERT_INFO_SUBJECT_GROUP);
34 html_source->AddLocalizedString("issuedBy", IDS_CERT_INFO_ISSUER_GROUP); 33 html_source->AddLocalizedString("issuedBy", IDS_CERT_INFO_ISSUER_GROUP);
35 html_source->AddLocalizedString("cn", IDS_CERT_INFO_COMMON_NAME_LABEL); 34 html_source->AddLocalizedString("cn", IDS_CERT_INFO_COMMON_NAME_LABEL);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 : ConstrainedWebDialogUI(web_ui) { 80 : ConstrainedWebDialogUI(web_ui) {
82 // Set up the chrome://view-cert source. 81 // Set up the chrome://view-cert source.
83 Profile* profile = Profile::FromWebUI(web_ui); 82 Profile* profile = Profile::FromWebUI(web_ui);
84 content::WebUIDataSource::Add( 83 content::WebUIDataSource::Add(
85 profile, 84 profile,
86 GetWebUIDataSource(chrome::kChromeUICertificateViewerHost)); 85 GetWebUIDataSource(chrome::kChromeUICertificateViewerHost));
87 } 86 }
88 87
89 CertificateViewerUI::~CertificateViewerUI() { 88 CertificateViewerUI::~CertificateViewerUI() {
90 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_ui.cc ('k') | chrome/browser/ui/webui/chromeos/bluetooth_pairing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698