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 <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 wavefront.clear(); | 92 wavefront.clear(); |
93 wavefront.swap(next_wavefront); | 93 wavefront.swap(next_wavefront); |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
97 } // namespace | 97 } // namespace |
98 | 98 |
99 MemoryDetails::MemoryDetails() | 99 MemoryDetails::MemoryDetails() { |
100 : user_metrics_mode_(UPDATE_USER_METRICS), | |
101 memory_growth_tracker_(NULL) { | |
102 } | 100 } |
103 | 101 |
104 ProcessData* MemoryDetails::ChromeBrowser() { | 102 ProcessData* MemoryDetails::ChromeBrowser() { |
105 return &process_data_[0]; | 103 return &process_data_[0]; |
106 } | 104 } |
107 | 105 |
108 void MemoryDetails::CollectProcessData( | 106 void MemoryDetails::CollectProcessData( |
109 const std::vector<ProcessMemoryInformation>& chrome_processes) { | 107 const std::vector<ProcessMemoryInformation>& chrome_processes) { |
110 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
111 | 109 |
(...skipping 21 matching lines...) Expand all Loading... |
133 current_browser.name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 131 current_browser.name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
134 current_browser.process_name = | 132 current_browser.process_name = |
135 base::ASCIIToUTF16(chrome::kBrowserProcessExecutableName); | 133 base::ASCIIToUTF16(chrome::kBrowserProcessExecutableName); |
136 process_data_.push_back(current_browser); | 134 process_data_.push_back(current_browser); |
137 | 135 |
138 // Finally return to the browser thread. | 136 // Finally return to the browser thread. |
139 BrowserThread::PostTask( | 137 BrowserThread::PostTask( |
140 BrowserThread::UI, FROM_HERE, | 138 BrowserThread::UI, FROM_HERE, |
141 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 139 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
142 } | 140 } |
OLD | NEW |