Index: chrome/browser/chrome_browser_main_mac.mm |
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm |
index 0e9c5ae6b0c92a09613023e3b0828777f591ebc1..31016d66d67697b4c476d629daf0dd9e7b7f5c58 100644 |
--- a/chrome/browser/chrome_browser_main_mac.mm |
+++ b/chrome/browser/chrome_browser_main_mac.mm |
@@ -21,6 +21,7 @@ |
#include "chrome/browser/browser_process.h" |
#import "chrome/browser/chrome_browser_application_mac.h" |
#include "chrome/browser/mac/install_from_dmg.h" |
+#include "chrome/browser/mac/keychain_reauthorize.h" |
#import "chrome/browser/mac/keystone_glue.h" |
#include "chrome/browser/mac/mac_startup_profiler.h" |
#include "chrome/browser/ui/app_list/app_list_service.h" |
@@ -156,6 +157,17 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() { |
[object retain]; |
// Make sure the app controller has been created. |
DCHECK([NSApp delegate]); |
+ |
+ // Do Keychain reauthorization. This gets two chances to run. If the first |
+ // try doesn't complete successfully (crashes or is interrupted for any |
+ // reason), there will be a second chance. Once this step completes |
+ // successfully, it should never have to run again. |
+ NSString* const keychain_reauthorize_pref = |
+ @"KeychainReauthorizeInAppSpring2017"; |
+ const int kKeychainReauthorizeMaxTries = 2; |
+ |
+ chrome::KeychainReauthorizeIfNeeded(keychain_reauthorize_pref, |
+ kKeychainReauthorizeMaxTries); |
} |
void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { |