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

Unified Diff: sync/syncable/directory.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/syncable/directory.h ('k') | sync/syncable/nigori_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index 92ec65e07a51ce3b32355ae60b46b304a595ed4a..77979ae10930c033318c87840f3f6413395ec866 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) {
}
@@ -724,9 +726,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,
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/syncable/nigori_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698