| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 wavefront.clear(); | 87 wavefront.clear(); |
| 88 wavefront.swap(next_wavefront); | 88 wavefront.swap(next_wavefront); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace | 92 } // namespace |
| 93 | 93 |
| 94 MemoryDetails::MemoryDetails() { | 94 MemoryDetails::MemoryDetails() |
| 95 : user_metrics_mode_(UPDATE_USER_METRICS) { |
| 95 } | 96 } |
| 96 | 97 |
| 97 ProcessData* MemoryDetails::ChromeBrowser() { | 98 ProcessData* MemoryDetails::ChromeBrowser() { |
| 98 return &process_data_[0]; | 99 return &process_data_[0]; |
| 99 } | 100 } |
| 100 | 101 |
| 101 void MemoryDetails::CollectProcessData( | 102 void MemoryDetails::CollectProcessData( |
| 102 const std::vector<ProcessMemoryInformation>& chrome_processes) { | 103 const std::vector<ProcessMemoryInformation>& chrome_processes) { |
| 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 104 | 105 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 126 current_browser.name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 127 current_browser.name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
| 127 current_browser.process_name = | 128 current_browser.process_name = |
| 128 reinterpret_cast<unsigned int>(chrome::kBrowserProcessExecutableName); | 129 reinterpret_cast<unsigned int>(chrome::kBrowserProcessExecutableName); |
| 129 process_data_.push_back(current_browser); | 130 process_data_.push_back(current_browser); |
| 130 | 131 |
| 131 // Finally return to the browser thread. | 132 // Finally return to the browser thread. |
| 132 BrowserThread::PostTask( | 133 BrowserThread::PostTask( |
| 133 BrowserThread::UI, FROM_HERE, | 134 BrowserThread::UI, FROM_HERE, |
| 134 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); | 135 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); |
| 135 } | 136 } |
| OLD | NEW |