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

Unified Diff: google_apis/gcm/engine/gcm_store_impl.cc

Issue 183953005: Rename components's Encryptor to OSEncrypt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: google_apis/gcm/engine/gcm_store_impl.cc
diff --git a/google_apis/gcm/engine/gcm_store_impl.cc b/google_apis/gcm/engine/gcm_store_impl.cc
index efbb1f3813bf3dff3032428d713d7985282fd9f4..31b258f7a6c149281bbe379ef4e2f49ee82e4cae 100644
--- a/google_apis/gcm/engine/gcm_store_impl.cc
+++ b/google_apis/gcm/engine/gcm_store_impl.cc
@@ -17,7 +17,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/tracked_objects.h"
-#include "components/encryptor/encryptor.h"
+#include "components/encryptor/os_crypt.h"
#include "google_apis/gcm/base/mcs_message.h"
#include "google_apis/gcm/base/mcs_util.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
@@ -241,8 +241,8 @@ void GCMStoreImpl::Backend::SetDeviceCredentials(
write_options.sync = true;
std::string encrypted_token;
- Encryptor::EncryptString(base::Uint64ToString(device_security_token),
- &encrypted_token);
+ OSCrypt::EncryptString(base::Uint64ToString(device_security_token),
+ &encrypted_token);
std::string android_id_str = base::Uint64ToString(device_android_id);
leveldb::Status s =
db_->Put(write_options,
@@ -487,7 +487,7 @@ bool GCMStoreImpl::Backend::LoadDeviceCredentials(uint64* android_id,
}
if (s.ok()) {
std::string decrypted_token;
- Encryptor::DecryptString(result, &decrypted_token);
+ OSCrypt::DecryptString(result, &decrypted_token);
if (!base::StringToUint64(decrypted_token, security_token)) {
LOG(ERROR) << "Failed to restore security token.";
return false;
@@ -618,7 +618,7 @@ GCMStoreImpl::GCMStoreImpl(
weak_ptr_factory_(this) {
// On OSX, prevent the Keychain permissions popup during unit tests.
#if defined(OS_MACOSX)
- Encryptor::UseMockKeychain(use_mock_keychain);
+ OSCrypt::UseMockKeychain(use_mock_keychain);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698