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

Side by Side Diff: chrome/browser/chromeos/settings/token_encryptor.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace crypto { 13 namespace crypto {
14 class SymmetricKey; 14 class SymmetricKey;
15 } 15 }
16 16
17 namespace chromeos { 17 namespace chromeos {
18 18
19 // Interface class for classes that encrypt and decrypt tokens using the 19 // Interface class for classes that encrypt and decrypt tokens using the
20 // system salt. 20 // system salt.
21 class TokenEncryptor { 21 class TokenEncryptor {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 std::string DecryptTokenWithKey(crypto::SymmetricKey* key, 59 std::string DecryptTokenWithKey(crypto::SymmetricKey* key,
60 const std::string& salt, 60 const std::string& salt,
61 const std::string& encrypted_token_hex); 61 const std::string& encrypted_token_hex);
62 62
63 // The cached system salt passed to the constructor, originally coming 63 // The cached system salt passed to the constructor, originally coming
64 // from cryptohome daemon. 64 // from cryptohome daemon.
65 std::string system_salt_; 65 std::string system_salt_;
66 66
67 // A key based on the system salt. Useful for encrypting device-level 67 // A key based on the system salt. Useful for encrypting device-level
68 // data for which we have no additional credentials. 68 // data for which we have no additional credentials.
69 scoped_ptr<crypto::SymmetricKey> system_salt_key_; 69 std::unique_ptr<crypto::SymmetricKey> system_salt_key_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(CryptohomeTokenEncryptor); 71 DISALLOW_COPY_AND_ASSIGN(CryptohomeTokenEncryptor);
72 }; 72 };
73 73
74 } // namespace chromeos 74 } // namespace chromeos
75 75
76 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_ 76 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/system_settings_provider.h ('k') | chrome/browser/chromeos/shutdown_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698