| OLD | NEW |
| 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 #include "components/os_crypt/os_crypt.h" | 5 #include "components/os_crypt/os_crypt.h" |
| 6 | 6 |
| 7 #include <CommonCrypto/CommonCryptor.h> // for kCCBlockSizeAES128 | 7 #include <CommonCrypto/CommonCryptor.h> // for kCCBlockSizeAES128 |
| 8 #include <stddef.h> |
| 8 | 9 |
| 9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 10 #include "base/debug/leak_annotations.h" | 11 #include "base/debug/leak_annotations.h" |
| 11 #include "base/logging.h" | 12 #include "base/logging.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 15 #include "components/os_crypt/keychain_password_mac.h" | 16 #include "components/os_crypt/keychain_password_mac.h" |
| 16 #include "components/os_crypt/os_crypt_switches.h" | 17 #include "components/os_crypt/os_crypt_switches.h" |
| 17 #include "crypto/apple_keychain.h" | 18 #include "crypto/apple_keychain.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 if (!encryptor.Decrypt(raw_ciphertext, plaintext)) | 163 if (!encryptor.Decrypt(raw_ciphertext, plaintext)) |
| 163 return false; | 164 return false; |
| 164 | 165 |
| 165 return true; | 166 return true; |
| 166 } | 167 } |
| 167 | 168 |
| 168 void OSCrypt::UseMockKeychain(bool use_mock) { | 169 void OSCrypt::UseMockKeychain(bool use_mock) { |
| 169 use_mock_keychain = use_mock; | 170 use_mock_keychain = use_mock; |
| 170 } | 171 } |
| 171 | 172 |
| OLD | NEW |