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

Side by Side Diff: chrome/browser/mac/keychain_reauthorize.h

Issue 2721333005: Reauthorize Keychain to Replace Developer ID Certificate (Closed)
Patch Set: Reauthorize Keychain to Replace Developer ID Certificate 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
6 #define CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
7
8 #ifdef __OBJC__
9 @class NSString;
10 #else
11 class NSString;
12 #endif
13
14 namespace chrome {
15
16 // Calls KeychainReauthorize, but only if it's determined that it's necessary.
17 // pref_key is looked up in the system's standard user defaults (preferences)
18 // and if its integer value is less than max_tries, KeychainReauthorize is
19 // attempted. Before the attempt, the preference is incremented, allowing a
20 // finite number of incomplete attempts at performing the KeychainReauthorize
21 // operation. When the step completes successfully, the preference is set to
22 // max_tries to prevent further attempts, and the preference name with the
23 // word "Success" appended is also stored with a boolean value of YES,
24 // disambiguating between the cases where the step completed successfully and
25 // the step completed unsuccessfully while reaching the maximum number of
26 // tries.
27 //
28 // The system's standard user defaults for the application are used
29 // (~/Library/Preferences/com.google.Chrome.plist,
30 // com.google.Chrome.canary.plist, etc.) instead of Chrome preferences because
31 // Keychain access is tied more closely to the bundle identifier and signed
32 // product than it is to any specific profile (--user-data-dir).
33 void KeychainReauthorizeIfNeeded(NSString* pref_key, int max_tries);
34
35 } // namespace chrome
36
37 #endif // CHROME_BROWSER_MAC_KEYCHAIN_REAUTHORIZE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698