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

Unified Diff: sync/syncable/directory.cc

Issue 10844005: [Sync] Refactor GetEncryptedTypes usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always trigger OnEncryptedTypesChanged on init 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: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index 9348338925f114f2e8052c7323fc4f30bebf0255..4189f4eeb44f04416d6fd4ff9541408381977e4a 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -136,17 +136,19 @@ Directory::Kernel::~Kernel() {
}
Directory::Directory(
- Encryptor* encryptor,
+ DirectoryBackingStore* store,
UnrecoverableErrorHandler* unrecoverable_error_handler,
ReportUnrecoverableErrorFunction report_unrecoverable_error_function,
- DirectoryBackingStore* store)
- : cryptographer_(encryptor),
- kernel_(NULL),
+ NigoriHandler* nigori_handler,
+ Cryptographer* cryptographer)
+ : kernel_(NULL),
store_(store),
unrecoverable_error_handler_(unrecoverable_error_handler),
report_unrecoverable_error_function_(
report_unrecoverable_error_function),
unrecoverable_error_set_(false),
+ nigori_handler_(nigori_handler),
+ cryptographer_(cryptographer),
invariant_check_level_(VERIFY_CHANGES) {
}
@@ -716,9 +718,13 @@ string Directory::cache_guid() const {
return kernel_->cache_guid;
}
+NigoriHandler* Directory::GetNigoriHandler() {
+ return nigori_handler_;
+}
+
Cryptographer* Directory::GetCryptographer(const BaseTransaction* trans) {
DCHECK_EQ(this, trans->directory());
- return &cryptographer_;
+ return cryptographer_;
}
void Directory::GetAllMetaHandles(BaseTransaction* trans,

Powered by Google App Engine
This is Rietveld 408576698