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

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

Issue 12045022: Move code in ui\webui\jstemplate_builder.* to webui namespace for consistency. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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/chromeos/system_info_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 DictionaryValue* val = new DictionaryValue; 146 DictionaryValue* val = new DictionaryValue;
147 val->SetString("stat_name", it->first); 147 val->SetString("stat_name", it->first);
148 val->SetString("stat_value", it->second); 148 val->SetString("stat_value", it->second);
149 details->Append(val); 149 details->Append(val);
150 } 150 }
151 strings.SetString("anchor", path_); 151 strings.SetString("anchor", path_);
152 } 152 }
153 static const base::StringPiece systeminfo_html( 153 static const base::StringPiece systeminfo_html(
154 ResourceBundle::GetSharedInstance().GetRawDataResource( 154 ResourceBundle::GetSharedInstance().GetRawDataResource(
155 IDR_ABOUT_SYS_HTML)); 155 IDR_ABOUT_SYS_HTML));
156 std::string full_html = jstemplate_builder::GetTemplatesHtml( 156 std::string full_html = webui::GetTemplatesHtml(
157 systeminfo_html, &strings, "t" /* template root node id */); 157 systeminfo_html, &strings, "t" /* template root node id */);
158 callback_.Run(base::RefCountedString::TakeString(&full_html)); 158 callback_.Run(base::RefCountedString::TakeString(&full_html));
159 } 159 }
160 160
161 //////////////////////////////////////////////////////////////////////////////// 161 ////////////////////////////////////////////////////////////////////////////////
162 // 162 //
163 // SystemInfoHandler 163 // SystemInfoHandler
164 // 164 //
165 //////////////////////////////////////////////////////////////////////////////// 165 ////////////////////////////////////////////////////////////////////////////////
166 SystemInfoHandler::SystemInfoHandler() { 166 SystemInfoHandler::SystemInfoHandler() {
(...skipping 16 matching lines...) Expand all
183 SystemInfoHandler* handler = new SystemInfoHandler(); 183 SystemInfoHandler* handler = new SystemInfoHandler();
184 web_ui->AddMessageHandler(handler); 184 web_ui->AddMessageHandler(handler);
185 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); 185 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
186 186
187 // Set up the chrome://system/ source. 187 // Set up the chrome://system/ source.
188 Profile* profile = Profile::FromWebUI(web_ui); 188 Profile* profile = Profile::FromWebUI(web_ui);
189 ChromeURLDataManager::AddDataSource(profile, html_source); 189 ChromeURLDataManager::AddDataSource(profile, html_source);
190 } 190 }
191 191
192 } // namespace chromeos 192 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698