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
3 // found in the LICENSE file.
5 #include "chrome/browser/chrome_browser_main_linux.h"
7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/metrics/metrics_service.h"
9 #include "components/breakpad/app/breakpad_linux.h"
11 #if !defined(OS_CHROMEOS)
12 #include "base/linux_util.h"
13 #include "chrome/browser/sxs_linux.h"
14 #include "content/public/browser/browser_thread.h"
17 ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
18 const content::MainFunctionParams
& parameters
)
19 : ChromeBrowserMainPartsPosix(parameters
) {
22 ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLinux() {
25 void ChromeBrowserMainPartsLinux::PreProfileInit() {
26 #if !defined(OS_CHROMEOS)
27 // Needs to be called after we have chrome::DIR_USER_DATA and
28 // g_browser_process. This happens in PreCreateThreads.
29 // base::GetLinuxDistro() will initialize its value if needed.
30 content::BrowserThread::PostBlockingPoolTask(
32 base::Bind(base::IgnoreResult(&base::GetLinuxDistro
)));
34 content::BrowserThread::PostBlockingPoolTask(
36 base::Bind(&sxs_linux::AddChannelMarkToUserDataDir
));
39 ChromeBrowserMainPartsPosix::PreProfileInit();
42 void ChromeBrowserMainPartsLinux::PostProfileInit() {
43 ChromeBrowserMainPartsPosix::PostProfileInit();
45 g_browser_process
->metrics_service()->RecordBreakpadRegistration(
46 breakpad::IsCrashReporterEnabled());