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

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

Issue 2118443002: Forward password-store switch to OSCrypt component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Verify that target does not change after lazy initialization Created 4 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 | « no previous file | components/components_tests.gyp » ('j') | components/components_tests.gyp » ('J')
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 <fontconfig/fontconfig.h> 7 #include <fontconfig/fontconfig.h>
8 8
9 #include <string>
10
9 #include "build/build_config.h" 11 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
11 #include "chrome/grit/chromium_strings.h" 13 #include "chrome/grit/chromium_strings.h"
12 #include "components/crash/content/app/breakpad_linux.h" 14 #include "components/crash/content/app/breakpad_linux.h"
13 #include "components/metrics/metrics_service.h" 15 #include "components/metrics/metrics_service.h"
14 #include "device/bluetooth/dbus/bluez_dbus_manager.h" 16 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
15 #include "device/bluetooth/dbus/dbus_thread_manager_linux.h" 17 #include "device/bluetooth/dbus/dbus_thread_manager_linux.h"
16 #include "media/audio/audio_manager.h" 18 #include "media/audio/audio_manager.h"
17 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
18 20
19 #if !defined(OS_CHROMEOS) 21 #if !defined(OS_CHROMEOS)
22 #include "base/command_line.h"
20 #include "base/linux_util.h" 23 #include "base/linux_util.h"
24 #include "chrome/common/chrome_switches.h"
25 #include "components/os_crypt/os_crypt.h"
21 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
22 #endif 27 #endif
23 28
24 ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux( 29 ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
25 const content::MainFunctionParams& parameters) 30 const content::MainFunctionParams& parameters)
26 : ChromeBrowserMainPartsPosix(parameters) { 31 : ChromeBrowserMainPartsPosix(parameters) {
27 } 32 }
28 33
29 ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLinux() { 34 ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLinux() {
30 } 35 }
(...skipping 21 matching lines...) Expand all
52 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME)); 57 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME));
53 58
54 ChromeBrowserMainPartsPosix::PreProfileInit(); 59 ChromeBrowserMainPartsPosix::PreProfileInit();
55 } 60 }
56 61
57 void ChromeBrowserMainPartsLinux::PostProfileInit() { 62 void ChromeBrowserMainPartsLinux::PostProfileInit() {
58 ChromeBrowserMainPartsPosix::PostProfileInit(); 63 ChromeBrowserMainPartsPosix::PostProfileInit();
59 64
60 g_browser_process->metrics_service()->RecordBreakpadRegistration( 65 g_browser_process->metrics_service()->RecordBreakpadRegistration(
61 breakpad::IsCrashReporterEnabled()); 66 breakpad::IsCrashReporterEnabled());
67
68 #if !defined(OS_CHROMEOS)
69 // Forward to os_crypt the flag to use a specific password store.
70 std::string password_store =
71 parsed_command_line().GetSwitchValueASCII(switches::kPasswordStore);
72 OSCrypt::SetStore(password_store);
73 #endif // !defined(OS_CHROMEOS)
62 } 74 }
63 75
64 void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() { 76 void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
65 #if !defined(OS_CHROMEOS) 77 #if !defined(OS_CHROMEOS)
66 bluez::DBusThreadManagerLinux::Initialize(); 78 bluez::DBusThreadManagerLinux::Initialize();
67 bluez::BluezDBusManager::Initialize( 79 bluez::BluezDBusManager::Initialize(
68 bluez::DBusThreadManagerLinux::Get()->GetSystemBus(), false); 80 bluez::DBusThreadManagerLinux::Get()->GetSystemBus(), false);
69 #endif 81 #endif
70 82
71 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart(); 83 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart();
72 } 84 }
73 85
74 void ChromeBrowserMainPartsLinux::PostDestroyThreads() { 86 void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
75 #if !defined(OS_CHROMEOS) 87 #if !defined(OS_CHROMEOS)
76 bluez::BluezDBusManager::Shutdown(); 88 bluez::BluezDBusManager::Shutdown();
77 bluez::DBusThreadManagerLinux::Shutdown(); 89 bluez::DBusThreadManagerLinux::Shutdown();
78 #endif 90 #endif
79 91
80 ChromeBrowserMainPartsPosix::PostDestroyThreads(); 92 ChromeBrowserMainPartsPosix::PostDestroyThreads();
81 } 93 }
OLDNEW
« no previous file with comments | « no previous file | components/components_tests.gyp » ('j') | components/components_tests.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698