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

Unified Diff: chrome/browser/sync/glue/generic_change_processor.cc

Issue 10844005: [Sync] Refactor GetEncryptedTypes usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + add dcheck Created 8 years, 4 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: chrome/browser/sync/glue/generic_change_processor.cc
diff --git a/chrome/browser/sync/glue/generic_change_processor.cc b/chrome/browser/sync/glue/generic_change_processor.cc
index 4cdfb9eff0482cc2618fe9531ec803206df6002b..ef081c49275d9cbf2c53b30138eb5c3fd2b4dfd4 100644
--- a/chrome/browser/sync/glue/generic_change_processor.cc
+++ b/chrome/browser/sync/glue/generic_change_processor.cc
@@ -376,7 +376,7 @@ syncer::SyncError GenericChangeProcessor::ProcessSyncChanges(
return error;
} else {
syncer::Cryptographer* crypto = trans.GetCryptographer();
- syncer::ModelTypeSet encrypted_types(crypto->GetEncryptedTypes());
+ syncer::ModelTypeSet encrypted_types(trans.GetEncryptedTypes());
const sync_pb::EntitySpecifics& specifics =
sync_node.GetEntry()->Get(syncer::syncable::SPECIFICS);
CHECK(specifics.has_encrypted());
@@ -475,7 +475,7 @@ bool GenericChangeProcessor::CryptoReadyIfNecessary(syncer::ModelType type) {
DCHECK_NE(type, syncer::UNSPECIFIED);
// We only access the cryptographer while holding a transaction.
syncer::ReadTransaction trans(FROM_HERE, share_handle());
- const syncer::ModelTypeSet encrypted_types = GetEncryptedTypes(&trans);
+ const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes();
return !encrypted_types.Has(type) ||
trans.GetCryptographer()->is_ready();
}
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698