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

Side by Side Diff: chrome/browser/ui/webui/version_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
« no previous file with comments | « chrome/browser/ui/webui/uber/uber_ui.cc ('k') | chrome/browser/ui/webui/voicesearch_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/version_ui.h" 5 #include "chrome/browser/ui/webui/version_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 IDS_ABOUT_VERSION_EXECUTABLE_PATH); 108 IDS_ABOUT_VERSION_EXECUTABLE_PATH);
109 html_source->AddString("executable_path", std::string()); 109 html_source->AddString("executable_path", std::string());
110 110
111 html_source->AddLocalizedString("profile_path_name", 111 html_source->AddLocalizedString("profile_path_name",
112 IDS_ABOUT_VERSION_PROFILE_PATH); 112 IDS_ABOUT_VERSION_PROFILE_PATH);
113 html_source->AddString("profile_path", std::string()); 113 html_source->AddString("profile_path", std::string());
114 114
115 html_source->AddLocalizedString("variations_name", 115 html_source->AddLocalizedString("variations_name",
116 IDS_ABOUT_VERSION_VARIATIONS); 116 IDS_ABOUT_VERSION_VARIATIONS);
117 117
118 html_source->SetUseJsonJSFormatV2();
119 html_source->SetJsonPath("strings.js"); 118 html_source->SetJsonPath("strings.js");
120 html_source->AddResourcePath("version.js", IDR_ABOUT_VERSION_JS); 119 html_source->AddResourcePath("version.js", IDR_ABOUT_VERSION_JS);
121 html_source->AddResourcePath("about_version.css", IDR_ABOUT_VERSION_CSS); 120 html_source->AddResourcePath("about_version.css", IDR_ABOUT_VERSION_CSS);
122 html_source->SetDefaultResource(IDR_ABOUT_VERSION_HTML); 121 html_source->SetDefaultResource(IDR_ABOUT_VERSION_HTML);
123 return html_source; 122 return html_source;
124 } 123 }
125 124
126 } // namespace 125 } // namespace
127 126
128 VersionUI::VersionUI(content::WebUI* web_ui) 127 VersionUI::VersionUI(content::WebUI* web_ui)
(...skipping 10 matching lines...) Expand all
139 // Set up the chrome://theme/ source. 138 // Set up the chrome://theme/ source.
140 ThemeSource* theme = new ThemeSource(profile); 139 ThemeSource* theme = new ThemeSource(profile);
141 content::URLDataSource::Add(profile, theme); 140 content::URLDataSource::Add(profile, theme);
142 #endif 141 #endif
143 142
144 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); 143 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile));
145 } 144 }
146 145
147 VersionUI::~VersionUI() { 146 VersionUI::~VersionUI() {
148 } 147 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/uber/uber_ui.cc ('k') | chrome/browser/ui/webui/voicesearch_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698