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

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

Issue 588363002: WebUI: Update some more uses of the old-style i18ntemplate/LocalStrings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system_info_ui.h" 5 #include "chrome/browser/ui/webui/system_info_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/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 ++it) { 151 ++it) {
152 base::DictionaryValue* val = new base::DictionaryValue; 152 base::DictionaryValue* val = new base::DictionaryValue;
153 val->SetString("statName", it->first); 153 val->SetString("statName", it->first);
154 val->SetString("statValue", it->second); 154 val->SetString("statValue", it->second);
155 details->Append(val); 155 details->Append(val);
156 } 156 }
157 } 157 }
158 static const base::StringPiece systeminfo_html( 158 static const base::StringPiece systeminfo_html(
159 ResourceBundle::GetSharedInstance().GetRawDataResource( 159 ResourceBundle::GetSharedInstance().GetRawDataResource(
160 IDR_ABOUT_SYS_HTML)); 160 IDR_ABOUT_SYS_HTML));
161 std::string full_html = webui::GetTemplatesHtml( 161 webui::UseVersion2 version2;
162 systeminfo_html, &strings, "t" /* template root node id */); 162 std::string full_html = webui::GetI18nTemplateHtml(systeminfo_html, &strings);
163 callback_.Run(base::RefCountedString::TakeString(&full_html)); 163 callback_.Run(base::RefCountedString::TakeString(&full_html));
164 } 164 }
165 165
166 //////////////////////////////////////////////////////////////////////////////// 166 ////////////////////////////////////////////////////////////////////////////////
167 // 167 //
168 // SystemInfoHandler 168 // SystemInfoHandler
169 // 169 //
170 //////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////
171 SystemInfoHandler::SystemInfoHandler() { 171 SystemInfoHandler::SystemInfoHandler() {
172 } 172 }
(...skipping 13 matching lines...) Expand all
186 186
187 SystemInfoUI::SystemInfoUI(content::WebUI* web_ui) : WebUIController(web_ui) { 187 SystemInfoUI::SystemInfoUI(content::WebUI* web_ui) : WebUIController(web_ui) {
188 SystemInfoHandler* handler = new SystemInfoHandler(); 188 SystemInfoHandler* handler = new SystemInfoHandler();
189 web_ui->AddMessageHandler(handler); 189 web_ui->AddMessageHandler(handler);
190 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); 190 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
191 191
192 // Set up the chrome://system/ source. 192 // Set up the chrome://system/ source.
193 Profile* profile = Profile::FromWebUI(web_ui); 193 Profile* profile = Profile::FromWebUI(web_ui);
194 content::URLDataSource::Add(profile, html_source); 194 content::URLDataSource::Add(profile, html_source);
195 } 195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698