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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 2118443002: Forward password-store switch to OSCrypt component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also gyp 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 side-by-side diff with in-line comments
Download patch
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index eb91daa5dfe352ea2ed2f2826cc22f957e202742..cedc21e32a220224b6347fcd1a945d311d579c62 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -123,6 +123,11 @@
#include "base/environment.h"
#endif
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+// Linux allows to choose between different password stores.
+#include "components/os_crypt/os_crypt.h" // nogncheck
Lei Zhang 2016/07/12 02:02:53 Is the "nogncheck" needed? What are we ignoring?
cfroussios 2016/07/12 15:25:35 This was news to me (crbug/625122), but gn complet
+#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+
#if defined(OS_MACOSX) || defined(OS_WIN)
#include "chrome/browser/policy/policy_path_parser.h"
#endif
@@ -647,6 +652,13 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
metrics::LeakDetector::InitTLSSlot();
#endif
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ // Forward to os_crypt the flag to use a specific password store.
+ std::string password_store =
+ command_line.GetSwitchValueASCII(switches::kPasswordStore);
+ OSCrypt::SetStore(password_store);
Lei Zhang 2016/07/12 02:02:53 This is very early in the start up process indeed,
cfroussios 2016/07/12 15:25:35 From what I can tell, PostProfileInit() is early e
+#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+
return false;
}

Powered by Google App Engine
This is Rietveld 408576698