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/memory_details.h" | 5 #include "chrome/browser/memory_details.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_version_info.h" | 11 #include "base/file_version_info.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "chrome/grit/generated_resources.h" | 19 #include "chrome/grit/generated_resources.h" |
20 #include "components/nacl/common/nacl_process_type.h" | 20 #include "components/nacl/common/nacl_process_type.h" |
| 21 #include "components/strings/grit/components_strings.h" |
21 #include "content/public/browser/browser_child_process_host_iterator.h" | 22 #include "content/public/browser/browser_child_process_host_iterator.h" |
22 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/child_process_data.h" | 24 #include "content/public/browser/child_process_data.h" |
24 #include "content/public/browser/navigation_controller.h" | 25 #include "content/public/browser/navigation_controller.h" |
25 #include "content/public/browser/navigation_entry.h" | 26 #include "content/public/browser/navigation_entry.h" |
26 #include "content/public/browser/render_process_host.h" | 27 #include "content/public/browser/render_process_host.h" |
27 #include "content/public/browser/render_view_host.h" | 28 #include "content/public/browser/render_view_host.h" |
28 #include "content/public/browser/render_widget_host.h" | 29 #include "content/public/browser/render_widget_host.h" |
29 #include "content/public/browser/render_widget_host_iterator.h" | 30 #include "content/public/browser/render_widget_host_iterator.h" |
30 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // Get rid of other Chrome processes that are from a different profile. | 372 // Get rid of other Chrome processes that are from a different profile. |
372 auto is_unknown = [](ProcessMemoryInformation& process) { | 373 auto is_unknown = [](ProcessMemoryInformation& process) { |
373 return process.process_type == content::PROCESS_TYPE_UNKNOWN; | 374 return process.process_type == content::PROCESS_TYPE_UNKNOWN; |
374 }; | 375 }; |
375 auto& vector = chrome_browser->processes; | 376 auto& vector = chrome_browser->processes; |
376 vector.erase(std::remove_if(vector.begin(), vector.end(), is_unknown), | 377 vector.erase(std::remove_if(vector.begin(), vector.end(), is_unknown), |
377 vector.end()); | 378 vector.end()); |
378 | 379 |
379 OnDetailsAvailable(); | 380 OnDetailsAvailable(); |
380 } | 381 } |
OLD | NEW |