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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/os_crypt/key_storage_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_linux.cc
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc
index 16808f19c8499302ec4c3b464422847002efee66..bbc21dda1096751ca8a6ed1a508fd021cab61911 100644
--- a/chrome/browser/chrome_browser_main_linux.cc
+++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -62,6 +62,11 @@ void ChromeBrowserMainPartsLinux::PreProfileInit() {
parsed_command_line().GetSwitchValueASCII(switches::kPasswordStore));
// Forward the product name
OSCrypt::SetProductName(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
+ // OSCrypt may target keyring, which requires calls from the main thread.
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner(
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI));
+ OSCrypt::SetMainThreadRunner(main_thread_runner);
#endif
ChromeBrowserMainPartsPosix::PreProfileInit();
« 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