Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: chrome/browser/chrome_browser_main_linux.cc

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch up to SystemInfoStorage eject test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.h ('k') | chrome/browser/chrome_browser_main_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/linux_util.h" 10 #include "base/linux_util.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Needs to be called after we have chrome::DIR_USER_DATA and 111 // Needs to be called after we have chrome::DIR_USER_DATA and
112 // g_browser_process. This happens in PreCreateThreads. 112 // g_browser_process. This happens in PreCreateThreads.
113 content::BrowserThread::PostTask(content::BrowserThread::FILE, 113 content::BrowserThread::PostTask(content::BrowserThread::FILE,
114 FROM_HERE, 114 FROM_HERE,
115 base::Bind(&GetLinuxDistroCallback)); 115 base::Bind(&GetLinuxDistroCallback));
116 #endif 116 #endif
117 117
118 if (IsCrashReportingEnabled(local_state())) 118 if (IsCrashReportingEnabled(local_state()))
119 InitCrashReporter(); 119 InitCrashReporter();
120 120
121 #if !defined(OS_CHROMEOS)
122 const base::FilePath kDefaultMtabPath("/etc/mtab");
123 storage_monitor_.reset(new chrome::StorageMonitorLinux(kDefaultMtabPath));
124 #endif
125
126 ChromeBrowserMainPartsPosix::PreProfileInit(); 121 ChromeBrowserMainPartsPosix::PreProfileInit();
127 } 122 }
128 123
129 void ChromeBrowserMainPartsLinux::PostProfileInit() { 124 void ChromeBrowserMainPartsLinux::PostProfileInit() {
130 ChromeBrowserMainPartsPosix::PostProfileInit(); 125 ChromeBrowserMainPartsPosix::PostProfileInit();
131 126
132 g_browser_process->metrics_service()->RecordBreakpadRegistration( 127 g_browser_process->metrics_service()->RecordBreakpadRegistration(
133 IsCrashReporterEnabled()); 128 IsCrashReporterEnabled());
134 } 129 }
135
136 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
137 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun();
138
139 #if !defined(OS_CHROMEOS)
140 // 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
142 // single browser_test.
143 storage_monitor_.reset();
144 #endif
145 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.h ('k') | chrome/browser/chrome_browser_main_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698