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

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

Issue 18967002: Small cleanup for ChromeBrowserMain: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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 #if !defined(OS_CHROMEOS) 7 #if !defined(OS_CHROMEOS)
8 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" 8 #include "chrome/browser/storage_monitor/storage_monitor_linux.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #endif 10 #endif
11 11
12 #if defined(USE_LINUX_BREAKPAD) 12 #if defined(USE_LINUX_BREAKPAD)
13 #include <stdlib.h> 13 #include <stdlib.h>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/linux_util.h" 16 #include "base/linux_util.h"
17 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
18 #include "chrome/app/breakpad_linux.h" 18 #include "chrome/app/breakpad_linux.h"
19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/metrics/metrics_service.h"
19 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/env_vars.h" 22 #include "chrome/common/env_vars.h"
21 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
22 24
23 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
24 #include "chrome/browser/chromeos/settings/cros_settings.h" 26 #include "chrome/browser/chromeos/settings/cros_settings.h"
25 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 27 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
26 #include "chrome/common/chrome_version_info.h" 28 #include "chrome/common/chrome_version_info.h"
27 #include "chromeos/chromeos_switches.h" 29 #include "chromeos/chromeos_switches.h"
28 #endif 30 #endif
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::PostProfileInit() {
139 ChromeBrowserMainPartsPosix::PostProfileInit();
140
141 #if defined(USE_LINUX_BREAKPAD)
142 g_browser_process->metrics_service()->RecordBreakpadRegistration(
143 IsCrashReporterEnabled());
144 #else
145 g_browser_process->metrics_service()->RecordBreakpadRegistration(false);
petarj 2013/07/11 23:31:04 You can not use g_browser_process variable here, s
jam 2013/07/12 00:06:05 derat has fixed this
146 #endif
Nico 2013/07/10 17:50:52 (and this)
147 }
148
136 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { 149 void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() {
137 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); 150 ChromeBrowserMainPartsPosix::PostMainMessageLoopRun();
138 151
139 #if !defined(OS_CHROMEOS) 152 #if !defined(OS_CHROMEOS)
140 // Delete it now. Otherwise the FILE thread would be gone when we try to 153 // 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 154 // release it in the dtor and Valgrind would report a leak on almost every
142 // single browser_test. 155 // single browser_test.
143 storage_monitor_.reset(); 156 storage_monitor_.reset();
144 #endif 157 #endif
145 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698