| OLD | NEW |
| 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/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 | 1232 |
| 1233 for (size_t index = 0; index < process.processes.size(); index++) { | 1233 for (size_t index = 0; index < process.processes.size(); index++) { |
| 1234 if (process.processes[index].type == content::PROCESS_TYPE_BROWSER) | 1234 if (process.processes[index].type == content::PROCESS_TYPE_BROWSER) |
| 1235 BindProcessMetrics(browser_data, &process.processes[index]); | 1235 BindProcessMetrics(browser_data, &process.processes[index]); |
| 1236 else | 1236 else |
| 1237 AppendProcess(child_data, &process.processes[index]); | 1237 AppendProcess(child_data, &process.processes[index]); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 root.SetBoolean("show_other_browsers", | 1240 root.SetBoolean("show_other_browsers", |
| 1241 browser_defaults::kShowOtherBrowsersInAboutMemory); | 1241 browser_defaults::kShowOtherBrowsersInAboutMemory); |
| 1242 root.SetString("summary_desc", |
| 1243 l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC)); |
| 1244 |
| 1245 ChromeWebUIDataSource::SetFontAndTextDirection(&root); |
| 1242 | 1246 |
| 1243 std::string data; | 1247 std::string data; |
| 1244 jstemplate_builder::AppendJsonJS(&root, &data); | 1248 jstemplate_builder::AppendJsonJS(&root, &data); |
| 1245 source_->FinishDataRequest(data, request_id_); | 1249 source_->FinishDataRequest(data, request_id_); |
| 1246 } | 1250 } |
| 1247 | 1251 |
| 1248 #if defined(OS_CHROMEOS) | 1252 #if defined(OS_CHROMEOS) |
| 1249 // ChromeOSAboutVersionHandler ----------------------------------------------- | 1253 // ChromeOSAboutVersionHandler ----------------------------------------------- |
| 1250 | 1254 |
| 1251 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler( | 1255 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler( |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 | 1378 |
| 1375 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) | 1379 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) |
| 1376 : WebUIController(web_ui) { | 1380 : WebUIController(web_ui) { |
| 1377 Profile* profile = Profile::FromWebUI(web_ui); | 1381 Profile* profile = Profile::FromWebUI(web_ui); |
| 1378 ChromeURLDataManager::DataSource* source = | 1382 ChromeURLDataManager::DataSource* source = |
| 1379 new AboutUIHTMLSource(name, profile); | 1383 new AboutUIHTMLSource(name, profile); |
| 1380 if (source) { | 1384 if (source) { |
| 1381 ChromeURLDataManager::AddDataSource(profile, source); | 1385 ChromeURLDataManager::AddDataSource(profile, source); |
| 1382 } | 1386 } |
| 1383 } | 1387 } |
| OLD | NEW |