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 <psapi.h> | 7 #include <psapi.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <TlHelp32.h> | 9 #include <TlHelp32.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/file_version_info.h" | 14 #include "base/file_version_info.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "base/threading/sequenced_worker_pool.h" | |
20 #include "base/win/scoped_handle.h" | 19 #include "base/win/scoped_handle.h" |
21 #include "base/win/windows_version.h" | 20 #include "base/win/windows_version.h" |
22 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
23 #include "chrome/grit/chromium_strings.h" | 22 #include "chrome/grit/chromium_strings.h" |
24 #include "components/version_info/version_info.h" | 23 #include "components/version_info/version_info.h" |
25 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/common/process_type.h" | 25 #include "content/public/common/process_type.h" |
27 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
28 | 27 |
29 using content::BrowserThread; | 28 using content::BrowserThread; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 101 |
103 // Add the process info to our list. | 102 // Add the process info to our list. |
104 process_data_[0].processes.push_back(info); | 103 process_data_[0].processes.push_back(info); |
105 } while (::Process32Next(snapshot.Get(), &process_entry)); | 104 } while (::Process32Next(snapshot.Get(), &process_entry)); |
106 | 105 |
107 // Finally return to the browser thread. | 106 // Finally return to the browser thread. |
108 BrowserThread::PostTask( | 107 BrowserThread::PostTask( |
109 BrowserThread::UI, FROM_HERE, | 108 BrowserThread::UI, FROM_HERE, |
110 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 109 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
111 } | 110 } |
OLD | NEW |