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

Unified Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 2738053007: Activate keychain reauthorization. (Closed)
Patch Set: Split identifier for dev and canary Created 3 years, 9 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 | chrome/installer/mac/sign_app.sh.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | chrome/installer/mac/sign_app.sh.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698