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

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

Issue 2159743002: Forward --password-store switch to os_crypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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') | 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 <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 13 matching lines...) Expand all
44 // g_browser_process. This happens in PreCreateThreads. 49 // g_browser_process. This happens in PreCreateThreads.
45 // base::GetLinuxDistro() will initialize its value if needed. 50 // base::GetLinuxDistro() will initialize its value if needed.
46 content::BrowserThread::PostBlockingPoolTask( 51 content::BrowserThread::PostBlockingPoolTask(
47 FROM_HERE, 52 FROM_HERE,
48 base::Bind(base::IgnoreResult(&base::GetLinuxDistro))); 53 base::Bind(base::IgnoreResult(&base::GetLinuxDistro)));
49 #endif 54 #endif
50 55
51 media::AudioManager::SetGlobalAppName( 56 media::AudioManager::SetGlobalAppName(
52 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME)); 57 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME));
53 58
59 #if !defined(OS_CHROMEOS)
60 // Forward to os_crypt the flag to use a specific password store.
61 std::string password_store =
62 parsed_command_line().GetSwitchValueASCII(switches::kPasswordStore);
63 OSCrypt::SetStore(password_store);
64 #endif
65
54 ChromeBrowserMainPartsPosix::PreProfileInit(); 66 ChromeBrowserMainPartsPosix::PreProfileInit();
55 } 67 }
56 68
57 void ChromeBrowserMainPartsLinux::PostProfileInit() { 69 void ChromeBrowserMainPartsLinux::PostProfileInit() {
58 ChromeBrowserMainPartsPosix::PostProfileInit(); 70 ChromeBrowserMainPartsPosix::PostProfileInit();
59 71
60 g_browser_process->metrics_service()->RecordBreakpadRegistration( 72 g_browser_process->metrics_service()->RecordBreakpadRegistration(
61 breakpad::IsCrashReporterEnabled()); 73 breakpad::IsCrashReporterEnabled());
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698