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

Unified Diff: components/sync/core/base_transaction.cc

Issue 2285753002: Passing correct passhprase type in the generic change processor. (Closed)
Patch Set: Created 4 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 | « components/sync/core/base_transaction.h ('k') | components/sync/driver/generic_change_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/base_transaction.cc
diff --git a/components/sync/core/base_transaction.cc b/components/sync/core/base_transaction.cc
index ca61433b5c0ac49182e81559c2404d949f59b7f7..dcf7e0dd9d3048b832dbd5124ea55e7c4409a54a 100644
--- a/components/sync/core/base_transaction.cc
+++ b/components/sync/core/base_transaction.cc
@@ -5,6 +5,7 @@
#include "components/sync/core/base_transaction.h"
#include "components/sync/base/cryptographer.h"
+#include "components/sync/base/passphrase_type.h"
#include "components/sync/syncable/directory.h"
#include "components/sync/syncable/nigori_handler.h"
@@ -29,4 +30,12 @@ ModelTypeSet BaseTransaction::GetEncryptedTypes() const {
: ModelTypeSet();
}
+PassphraseType BaseTransaction::GetPassphraseType() const {
+ syncable::NigoriHandler* nigori_handler = GetDirectory()->GetNigoriHandler();
+ return nigori_handler
+ ? nigori_handler->GetPassphraseType(this->GetWrappedTrans())
+ : syncer::PassphraseType::UNDEFINED;
+}
+
+
} // namespace syncer
« no previous file with comments | « components/sync/core/base_transaction.h ('k') | components/sync/driver/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698