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