OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "chromeos/cryptohome/cryptohome_library.h" | 5 #include "chromeos/cryptohome/cryptohome_library.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/chromeos/chromeos_version.h" | 10 #include "base/chromeos/chromeos_version.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 | 284 |
285 virtual bool InstallAttributesIsFirstInstall() OVERRIDE { | 285 virtual bool InstallAttributesIsFirstInstall() OVERRIDE { |
286 return !locked_; | 286 return !locked_; |
287 } | 287 } |
288 | 288 |
289 virtual std::string GetSystemSalt() OVERRIDE { | 289 virtual std::string GetSystemSalt() OVERRIDE { |
290 return kStubSystemSalt; | 290 return kStubSystemSalt; |
291 } | 291 } |
292 | 292 |
293 virtual std::string EncryptWithSystemSalt(const std::string& token) { | 293 virtual std::string EncryptWithSystemSalt(const std::string& token) OVERRIDE { |
294 return token; | 294 return token; |
295 } | 295 } |
296 | 296 |
297 virtual std::string DecryptWithSystemSalt( | 297 virtual std::string DecryptWithSystemSalt( |
298 const std::string& encrypted_token_hex) { | 298 const std::string& encrypted_token_hex) OVERRIDE { |
299 return encrypted_token_hex; | 299 return encrypted_token_hex; |
300 } | 300 } |
301 | 301 |
302 private: | 302 private: |
303 std::map<std::string, std::string> install_attrs_; | 303 std::map<std::string, std::string> install_attrs_; |
304 bool locked_; | 304 bool locked_; |
305 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibraryStubImpl); | 305 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibraryStubImpl); |
306 }; | 306 }; |
307 | 307 |
308 CryptohomeLibrary::CryptohomeLibrary() {} | 308 CryptohomeLibrary::CryptohomeLibrary() {} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 CHECK(!g_test_cryptohome_library || !impl); | 346 CHECK(!g_test_cryptohome_library || !impl); |
347 g_test_cryptohome_library = impl; | 347 g_test_cryptohome_library = impl; |
348 } | 348 } |
349 | 349 |
350 // static | 350 // static |
351 CryptohomeLibrary* CryptohomeLibrary::GetTestImpl() { | 351 CryptohomeLibrary* CryptohomeLibrary::GetTestImpl() { |
352 return new CryptohomeLibraryStubImpl(); | 352 return new CryptohomeLibraryStubImpl(); |
353 } | 353 } |
354 | 354 |
355 } // namespace chromeos | 355 } // namespace chromeos |
OLD | NEW |