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

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

Issue 2262693002: Initialize OSCrypt with a TaskRunner on the main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 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/os_crypt/key_storage_linux.h » ('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> 9 #include <string>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 media::AudioManager::SetGlobalAppName( 56 media::AudioManager::SetGlobalAppName(
57 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME)); 57 l10n_util::GetStringUTF8(IDS_SHORT_PRODUCT_NAME));
58 58
59 #if !defined(OS_CHROMEOS) 59 #if !defined(OS_CHROMEOS)
60 // Forward to os_crypt the flag to use a specific password store. 60 // Forward to os_crypt the flag to use a specific password store.
61 OSCrypt::SetStore( 61 OSCrypt::SetStore(
62 parsed_command_line().GetSwitchValueASCII(switches::kPasswordStore)); 62 parsed_command_line().GetSwitchValueASCII(switches::kPasswordStore));
63 // Forward the product name 63 // Forward the product name
64 OSCrypt::SetProductName(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME)); 64 OSCrypt::SetProductName(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
65 // OSCrypt may target keyring, which requires calls from the main thread.
66 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner(
67 content::BrowserThread::GetTaskRunnerForThread(
68 content::BrowserThread::UI));
69 OSCrypt::SetMainThreadRunner(main_thread_runner);
65 #endif 70 #endif
66 71
67 ChromeBrowserMainPartsPosix::PreProfileInit(); 72 ChromeBrowserMainPartsPosix::PreProfileInit();
68 } 73 }
69 74
70 void ChromeBrowserMainPartsLinux::PostProfileInit() { 75 void ChromeBrowserMainPartsLinux::PostProfileInit() {
71 ChromeBrowserMainPartsPosix::PostProfileInit(); 76 ChromeBrowserMainPartsPosix::PostProfileInit();
72 77
73 g_browser_process->metrics_service()->RecordBreakpadRegistration( 78 g_browser_process->metrics_service()->RecordBreakpadRegistration(
74 breakpad::IsCrashReporterEnabled()); 79 breakpad::IsCrashReporterEnabled());
(...skipping 10 matching lines...) Expand all
85 } 90 }
86 91
87 void ChromeBrowserMainPartsLinux::PostDestroyThreads() { 92 void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
88 #if !defined(OS_CHROMEOS) 93 #if !defined(OS_CHROMEOS)
89 bluez::BluezDBusManager::Shutdown(); 94 bluez::BluezDBusManager::Shutdown();
90 bluez::DBusThreadManagerLinux::Shutdown(); 95 bluez::DBusThreadManagerLinux::Shutdown();
91 #endif 96 #endif
92 97
93 ChromeBrowserMainPartsPosix::PostDestroyThreads(); 98 ChromeBrowserMainPartsPosix::PostDestroyThreads();
94 } 99 }
OLDNEW
« no previous file with comments | « no previous file | components/os_crypt/key_storage_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698