| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/feedback/system_logs/log_sources/memory_details_log_sou
rce.h" | 5 #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_sou
rce.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "chrome/browser/memory_details.h" | 8 #include "chrome/browser/memory_details.h" |
| 8 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 9 | 10 |
| 10 namespace system_logs { | 11 namespace system_logs { |
| 11 | 12 |
| 12 // Reads Chrome memory usage. | 13 // Reads Chrome memory usage. |
| 13 class SystemLogsMemoryHandler : public MemoryDetails { | 14 class SystemLogsMemoryHandler : public MemoryDetails { |
| 14 public: | 15 public: |
| 15 explicit SystemLogsMemoryHandler(const SysLogsSourceCallback& callback) | 16 explicit SystemLogsMemoryHandler(const SysLogsSourceCallback& callback) |
| 16 : callback_(callback) {} | 17 : callback_(callback) {} |
| (...skipping 25 matching lines...) Expand all Loading... |
| 42 void MemoryDetailsLogSource::Fetch(const SysLogsSourceCallback& callback) { | 43 void MemoryDetailsLogSource::Fetch(const SysLogsSourceCallback& callback) { |
| 43 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 44 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 44 DCHECK(!callback.is_null()); | 45 DCHECK(!callback.is_null()); |
| 45 | 46 |
| 46 scoped_refptr<SystemLogsMemoryHandler> | 47 scoped_refptr<SystemLogsMemoryHandler> |
| 47 handler(new SystemLogsMemoryHandler(callback)); | 48 handler(new SystemLogsMemoryHandler(callback)); |
| 48 handler->StartFetch(MemoryDetails::FROM_CHROME_ONLY); | 49 handler->StartFetch(MemoryDetails::FROM_CHROME_ONLY); |
| 49 } | 50 } |
| 50 | 51 |
| 51 } // namespace system_logs | 52 } // namespace system_logs |
| OLD | NEW |