Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chrome_browser_main_linux.cc
blob52f8641c960f7f6c31f02d81098b062ef8dcbf39
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 <stdlib.h>
9 #include "base/command_line.h"
10 #include "base/linux_util.h"
11 #include "base/prefs/pref_service.h"
12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/metrics/metrics_service.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/env_vars.h"
16 #include "chrome/common/pref_names.h"
17 #include "components/breakpad/app/breakpad_linux.h"
19 #if !defined(OS_CHROMEOS)
20 #include "chrome/browser/sxs_linux.h"
21 #include "content/public/browser/browser_thread.h"
22 #endif
24 namespace {
26 #if !defined(OS_CHROMEOS)
27 void GetLinuxDistroCallback() {
28 base::GetLinuxDistro(); // Initialize base::linux_distro if needed.
30 #endif
32 } // namespace
34 ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
35 const content::MainFunctionParams& parameters)
36 : ChromeBrowserMainPartsPosix(parameters) {
39 ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLinux() {
42 void ChromeBrowserMainPartsLinux::PreProfileInit() {
43 #if !defined(OS_CHROMEOS)
44 // Needs to be called after we have chrome::DIR_USER_DATA and
45 // g_browser_process. This happens in PreCreateThreads.
46 content::BrowserThread::PostTask(content::BrowserThread::FILE,
47 FROM_HERE,
48 base::Bind(&GetLinuxDistroCallback));
50 content::BrowserThread::PostTask(
51 content::BrowserThread::FILE,
52 FROM_HERE,
53 base::Bind(&sxs_linux::AddChannelMarkToUserDataDir));
54 #endif
56 ChromeBrowserMainPartsPosix::PreProfileInit();
59 void ChromeBrowserMainPartsLinux::PostProfileInit() {
60 ChromeBrowserMainPartsPosix::PostProfileInit();
62 g_browser_process->metrics_service()->RecordBreakpadRegistration(
63 breakpad::IsCrashReporterEnabled());