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/chrome_browser_main_linux.h" | 5 #include "chrome/browser/chrome_browser_main_linux.h" |
6 | 6 |
| 7 #include "base/debug/trace_memory.h" |
| 8 |
7 #if !defined(OS_CHROMEOS) | 9 #if !defined(OS_CHROMEOS) |
8 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" | 10 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" |
9 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
10 #endif | 12 #endif |
11 | 13 |
12 #if defined(USE_LINUX_BREAKPAD) | 14 #if defined(USE_LINUX_BREAKPAD) |
13 #include <stdlib.h> | 15 #include <stdlib.h> |
14 | 16 |
15 #include "base/command_line.h" | 17 #include "base/command_line.h" |
16 #include "base/linux_util.h" | 18 #include "base/linux_util.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 #endif | 128 #endif |
127 | 129 |
128 #if !defined(OS_CHROMEOS) | 130 #if !defined(OS_CHROMEOS) |
129 const base::FilePath kDefaultMtabPath("/etc/mtab"); | 131 const base::FilePath kDefaultMtabPath("/etc/mtab"); |
130 storage_monitor_.reset(new chrome::StorageMonitorLinux(kDefaultMtabPath)); | 132 storage_monitor_.reset(new chrome::StorageMonitorLinux(kDefaultMtabPath)); |
131 #endif | 133 #endif |
132 | 134 |
133 ChromeBrowserMainPartsPosix::PreProfileInit(); | 135 ChromeBrowserMainPartsPosix::PreProfileInit(); |
134 } | 136 } |
135 | 137 |
| 138 void ChromeBrowserMainPartsLinux::PreMainMessageLoopRun() { |
| 139 ChromeBrowserMainPartsPosix::PreMainMessageLoopRun(); |
| 140 |
| 141 // TODO(jamescook): Only start this when tracing is flipped on. |
| 142 base::TraceMemoryStart(); |
| 143 } |
| 144 |
136 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { | 145 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { |
137 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); | 146 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); |
138 | 147 |
139 #if !defined(OS_CHROMEOS) | 148 #if !defined(OS_CHROMEOS) |
140 // Delete it now. Otherwise the FILE thread would be gone when we try to | 149 // Delete it now. Otherwise the FILE thread would be gone when we try to |
141 // release it in the dtor and Valgrind would report a leak on almost every | 150 // release it in the dtor and Valgrind would report a leak on almost every |
142 // single browser_test. | 151 // single browser_test. |
143 storage_monitor_.reset(); | 152 storage_monitor_.reset(); |
144 #endif | 153 #endif |
| 154 |
| 155 base::TraceMemoryStop(); |
145 } | 156 } |
OLD | NEW |