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

Side by Side Diff: components/os_crypt/keychain_password_mac.h

Issue 2721333005: Reauthorize Keychain to Replace Developer ID Certificate (Closed)
Patch Set: Remove histogram.h include 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
« no previous file with comments | « chrome/installer/mac/sign_app.sh.in ('k') | components/os_crypt/keychain_password_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_ 5 #ifndef COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_
6 #define COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_ 6 #define COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 11
12 namespace crypto { 12 namespace crypto {
13 class AppleKeychain; 13 class AppleKeychain;
14 } 14 }
15 15
16 class KeychainPassword { 16 class KeychainPassword {
17 public: 17 public:
18 explicit KeychainPassword(const crypto::AppleKeychain& keychain) 18 explicit KeychainPassword(const crypto::AppleKeychain& keychain)
19 : keychain_(keychain) { 19 : keychain_(keychain) {
20 } 20 }
21 21
22 // Get the OSCrypt password for this system. If no password exists 22 // Get the OSCrypt password for this system. If no password exists
23 // in the Keychain then one is generated, stored in the Mac keychain, and 23 // in the Keychain then one is generated, stored in the Mac keychain, and
24 // returned. 24 // returned.
25 // If one exists then it is fetched from the Keychain and returned. 25 // If one exists then it is fetched from the Keychain and returned.
26 // If the user disallows access to the Keychain (or an error occurs) then an 26 // If the user disallows access to the Keychain (or an error occurs) then an
27 // empty string is returned. 27 // empty string is returned.
28 std::string GetPassword() const; 28 std::string GetPassword() const;
29 29
30 // The service and account names used in Chrome's Safe Storage keychain item.
31 static const char service_name[];
32 static const char account_name[];
33
30 private: 34 private:
31 const crypto::AppleKeychain& keychain_; 35 const crypto::AppleKeychain& keychain_;
32 36
33 DISALLOW_COPY_AND_ASSIGN(KeychainPassword); 37 DISALLOW_COPY_AND_ASSIGN(KeychainPassword);
34 }; 38 };
35 39
36 #endif // COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_ 40 #endif // COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_
OLDNEW
« no previous file with comments | « chrome/installer/mac/sign_app.sh.in ('k') | components/os_crypt/keychain_password_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698