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

Unified Diff: components/encryptor/os_crypt_mac.mm

Issue 183953005: Rename components's Encryptor to OSEncrypt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: similarity Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/encryptor/os_crypt.h ('k') | components/encryptor/os_crypt_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/encryptor/os_crypt_mac.mm
diff --git a/components/encryptor/encryptor_mac.mm b/components/encryptor/os_crypt_mac.mm
similarity index 86%
rename from components/encryptor/encryptor_mac.mm
rename to components/encryptor/os_crypt_mac.mm
index 583f18af62618a4b33f06edd70bc6979b29c043e..13d6c2e530f34c0b557ee58e17f994c0afb57352 100644
--- a/components/encryptor/encryptor_mac.mm
+++ b/components/encryptor/os_crypt_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/encryptor/encryptor.h"
+#include "components/encryptor/os_crypt.h"
#include <CommonCrypto/CommonCryptor.h> // for kCCBlockSizeAES128
@@ -10,8 +10,8 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
-#include "components/encryptor/encryptor_password_mac.h"
#include "components/encryptor/encryptor_switches.h"
+#include "components/encryptor/keychain_password_mac.h"
#include "crypto/apple_keychain.h"
#include "crypto/encryptor.h"
#include "crypto/symmetric_key.h"
@@ -51,8 +51,8 @@ crypto::SymmetricKey* GetEncryptionKey() {
password = "mock_password";
} else {
AppleKeychain keychain;
- EncryptorPassword encryptor_password(keychain);
- password = encryptor_password.GetEncryptorPassword();
+ KeychainPassword encryptor_password(keychain);
+ password = encryptor_password.GetPassword();
}
if (password.empty())
@@ -74,13 +74,13 @@ crypto::SymmetricKey* GetEncryptionKey() {
} // namespace
-bool Encryptor::EncryptString16(const base::string16& plaintext,
- std::string* ciphertext) {
+bool OSCrypt::EncryptString16(const base::string16& plaintext,
+ std::string* ciphertext) {
return EncryptString(base::UTF16ToUTF8(plaintext), ciphertext);
}
-bool Encryptor::DecryptString16(const std::string& ciphertext,
- base::string16* plaintext) {
+bool OSCrypt::DecryptString16(const std::string& ciphertext,
+ base::string16* plaintext) {
std::string utf8;
if (!DecryptString(ciphertext, &utf8))
return false;
@@ -89,8 +89,8 @@ bool Encryptor::DecryptString16(const std::string& ciphertext,
return true;
}
-bool Encryptor::EncryptString(const std::string& plaintext,
- std::string* ciphertext) {
+bool OSCrypt::EncryptString(const std::string& plaintext,
+ std::string* ciphertext) {
if (plaintext.empty()) {
*ciphertext = std::string();
return true;
@@ -113,8 +113,8 @@ bool Encryptor::EncryptString(const std::string& plaintext,
return true;
}
-bool Encryptor::DecryptString(const std::string& ciphertext,
- std::string* plaintext) {
+bool OSCrypt::DecryptString(const std::string& ciphertext,
+ std::string* plaintext) {
if (ciphertext.empty()) {
*plaintext = std::string();
return true;
@@ -149,7 +149,7 @@ bool Encryptor::DecryptString(const std::string& ciphertext,
return true;
}
-void Encryptor::UseMockKeychain(bool use_mock) {
+void OSCrypt::UseMockKeychain(bool use_mock) {
use_mock_keychain = use_mock;
}
« no previous file with comments | « components/encryptor/os_crypt.h ('k') | components/encryptor/os_crypt_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698