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

Unified Diff: sync/engine/syncer_util.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
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/base_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_util.cc
diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc
index ca21f2e7bb78881d910794dda49511b86d3e592e..8a243df087b7ac968be8bd5cd3cbb0e1871e109f 100644
--- a/sync/engine/syncer_util.cc
+++ b/sync/engine/syncer_util.cc
@@ -22,6 +22,7 @@
#include "sync/syncable/directory.h"
#include "sync/syncable/entry.h"
#include "sync/syncable/mutable_entry.h"
+#include "sync/syncable/nigori_handler.h"
#include "sync/syncable/nigori_util.h"
#include "sync/syncable/read_transaction.h"
#include "sync/syncable/syncable_changes_version.h"
@@ -217,7 +218,7 @@ UpdateAttemptResponse AttemptToUpdateEntry(
// the nigori node (e.g. on restart), they will commit without issue.
if (specifics.has_nigori()) {
const sync_pb::NigoriSpecifics& nigori = specifics.nigori();
- cryptographer->ApplyNigoriUpdate(nigori, trans);
+ trans->directory()->GetNigoriHandler()->ApplyNigoriUpdate(nigori, trans);
// Make sure any unsynced changes are properly encrypted as necessary.
// We only perform this if the cryptographer is ready. If not, these are
@@ -235,7 +236,7 @@ UpdateAttemptResponse AttemptToUpdateEntry(
// If this fails, something is wrong with the cryptographer, but there's
// nothing we can do about it here.
DVLOG(1) << "Received new nigori, encrypting unsynced changes.";
- syncable::ProcessUnsyncedChangesForEncryption(trans, cryptographer);
+ syncable::ProcessUnsyncedChangesForEncryption(trans);
}
}
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/base_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698