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

Unified Diff: components/sync/test/fake_sync_encryption_handler.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/sync/test/fake_sync_encryption_handler.h ('k') | components/sync/test/local_sync_test_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/test/fake_sync_encryption_handler.cc
diff --git a/sync/test/fake_sync_encryption_handler.cc b/components/sync/test/fake_sync_encryption_handler.cc
similarity index 80%
rename from sync/test/fake_sync_encryption_handler.cc
rename to components/sync/test/fake_sync_encryption_handler.cc
index d524e60b68c0655b94c5ca64c2bb45968675b1f0..66bf7fb89938bcd0e6898be1f48421cbebebfcad 100644
--- a/sync/test/fake_sync_encryption_handler.cc
+++ b/components/sync/test/fake_sync_encryption_handler.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/test/fake_sync_encryption_handler.h"
+#include "components/sync/test/fake_sync_encryption_handler.h"
-#include "sync/protocol/nigori_specifics.pb.h"
-#include "sync/syncable/nigori_util.h"
+#include "components/sync/protocol/nigori_specifics.pb.h"
+#include "components/sync/syncable/nigori_util.h"
namespace syncer {
@@ -13,8 +13,7 @@ FakeSyncEncryptionHandler::FakeSyncEncryptionHandler()
: encrypted_types_(SensitiveTypes()),
encrypt_everything_(false),
passphrase_type_(IMPLICIT_PASSPHRASE),
- cryptographer_(&encryptor_) {
-}
+ cryptographer_(&encryptor_) {}
FakeSyncEncryptionHandler::~FakeSyncEncryptionHandler() {}
void FakeSyncEncryptionHandler::Init() {
@@ -41,14 +40,13 @@ void FakeSyncEncryptionHandler::ApplyNigoriUpdate(
DVLOG(1) << "OnPassPhraseRequired Sent";
sync_pb::EncryptedData pending_keys = cryptographer_.GetPendingKeys();
FOR_EACH_OBSERVER(SyncEncryptionHandler::Observer, observers_,
- OnPassphraseRequired(REASON_DECRYPTION,
- pending_keys));
+ OnPassphraseRequired(REASON_DECRYPTION, pending_keys));
} else if (!cryptographer_.is_ready()) {
DVLOG(1) << "OnPassphraseRequired sent because cryptographer is not "
<< "ready";
- FOR_EACH_OBSERVER(SyncEncryptionHandler::Observer, observers_,
- OnPassphraseRequired(REASON_ENCRYPTION,
- sync_pb::EncryptedData()));
+ FOR_EACH_OBSERVER(
+ SyncEncryptionHandler::Observer, observers_,
+ OnPassphraseRequired(REASON_ENCRYPTION, sync_pb::EncryptedData()));
}
}
@@ -56,8 +54,7 @@ void FakeSyncEncryptionHandler::UpdateNigoriFromEncryptedTypes(
sync_pb::NigoriSpecifics* nigori,
syncable::BaseTransaction* const trans) const {
syncable::UpdateNigoriFromEncryptedTypes(encrypted_types_,
- encrypt_everything_,
- nigori);
+ encrypt_everything_, nigori);
}
bool FakeSyncEncryptionHandler::NeedKeystoreKey(
@@ -70,16 +67,15 @@ bool FakeSyncEncryptionHandler::SetKeystoreKeys(
syncable::BaseTransaction* const trans) {
if (keys.size() == 0)
return false;
- std::string new_key = keys.Get(keys.size()-1);
+ std::string new_key = keys.Get(keys.size() - 1);
if (new_key.empty())
return false;
keystore_key_ = new_key;
-
DVLOG(1) << "Keystore bootstrap token updated.";
- FOR_EACH_OBSERVER(SyncEncryptionHandler::Observer, observers_,
- OnBootstrapTokenUpdated(keystore_key_,
- KEYSTORE_BOOTSTRAP_TOKEN));
+ FOR_EACH_OBSERVER(
+ SyncEncryptionHandler::Observer, observers_,
+ OnBootstrapTokenUpdated(keystore_key_, KEYSTORE_BOOTSTRAP_TOKEN));
return true;
}
« no previous file with comments | « components/sync/test/fake_sync_encryption_handler.h ('k') | components/sync/test/local_sync_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698