OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 | 1218 |
1219 std::string child_label( | 1219 std::string child_label( |
1220 ChildProcessInfo::GetFullTypeNameInEnglish(info->type, | 1220 ChildProcessInfo::GetFullTypeNameInEnglish(info->type, |
1221 info->renderer_type)); | 1221 info->renderer_type)); |
1222 if (info->is_diagnostics) | 1222 if (info->is_diagnostics) |
1223 child_label.append(" (diagnostics)"); | 1223 child_label.append(" (diagnostics)"); |
1224 child->SetString("child_name", child_label); | 1224 child->SetString("child_name", child_label); |
1225 ListValue* titles = new ListValue(); | 1225 ListValue* titles = new ListValue(); |
1226 child->Set("titles", titles); | 1226 child->Set("titles", titles); |
1227 for (size_t i = 0; i < info->titles.size(); ++i) | 1227 for (size_t i = 0; i < info->titles.size(); ++i) |
1228 titles->Append(new StringValue(info->titles[i])); | 1228 titles->Append(base::StringValue::New(info->titles[i])); |
1229 } | 1229 } |
1230 | 1230 |
1231 | 1231 |
1232 void AboutMemoryHandler::OnDetailsAvailable() { | 1232 void AboutMemoryHandler::OnDetailsAvailable() { |
1233 // the root of the JSON hierarchy for about:memory jstemplate | 1233 // the root of the JSON hierarchy for about:memory jstemplate |
1234 DictionaryValue root; | 1234 DictionaryValue root; |
1235 ListValue* browsers = new ListValue(); | 1235 ListValue* browsers = new ListValue(); |
1236 root.Set("browsers", browsers); | 1236 root.Set("browsers", browsers); |
1237 | 1237 |
1238 const std::vector<ProcessData>& browser_processes = processes(); | 1238 const std::vector<ProcessData>& browser_processes = processes(); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 return false; | 1525 return false; |
1526 } | 1526 } |
1527 | 1527 |
1528 std::vector<std::string> ChromePaths() { | 1528 std::vector<std::string> ChromePaths() { |
1529 std::vector<std::string> paths; | 1529 std::vector<std::string> paths; |
1530 paths.reserve(arraysize(kChromePaths)); | 1530 paths.reserve(arraysize(kChromePaths)); |
1531 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1531 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
1532 paths.push_back(kChromePaths[i]); | 1532 paths.push_back(kChromePaths[i]); |
1533 return paths; | 1533 return paths; |
1534 } | 1534 } |
OLD | NEW |