1 // Copyright (c) 2012 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.
5 #ifndef COMPONENTS_WEBDATA_ENCRYPTOR_ENCRYPTOR_PASSWORD_MAC_H_
6 #define COMPONENTS_WEBDATA_ENCRYPTOR_ENCRYPTOR_PASSWORD_MAC_H_
10 #include "base/basictypes.h"
16 class EncryptorPassword
{
18 explicit EncryptorPassword(const crypto::AppleKeychain
& keychain
)
19 : keychain_(keychain
) {
22 // Get the Encryptor password for this system. If no password exists
23 // in the Keychain then one is generated, stored in the Mac keychain, and
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
27 // empty string is returned.
28 std::string
GetEncryptorPassword() const;
31 DISALLOW_COPY_AND_ASSIGN(EncryptorPassword
);
32 const crypto::AppleKeychain
& keychain_
;
35 #endif // COMPONENTS_WEBDATA_ENCRYPTOR_ENCRYPTOR_PASSWORD_MAC_H_