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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 10540149: [Sync] Persist keystore key across restarts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 8 years, 5 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 | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host.h
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index a4b651b796809432d0bcf5da0f71521cbfb2a0c1..0a6fde3d7581d1c55fce46f4bffab9c66bd98142 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -297,6 +297,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
syncer::SyncManagerFactory* sync_manager_factory,
bool delete_sync_data_folder,
const std::string& restored_key_for_bootstrapping,
+ const std::string& restored_keystore_key_for_bootstrapping,
syncer::InternalComponentsFactory* internal_components_factory,
syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
syncer::ReportUnrecoverableErrorFunction
@@ -319,6 +320,7 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
std::string lsid;
bool delete_sync_data_folder;
std::string restored_key_for_bootstrapping;
+ std::string restored_keystore_key_for_bootstrapping;
syncer::InternalComponentsFactory* internal_components_factory;
syncer::UnrecoverableErrorHandler* unrecoverable_error_handler;
syncer::ReportUnrecoverableErrorFunction
@@ -368,6 +370,12 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
INITIALIZED, // Initialization is complete.
};
+ // Enum used to distinguish which bootstrap encryption token is being updated.
+ enum BootstrapTokenType {
+ PASSPHRASE_BOOTSTRAP_TOKEN,
+ KEYSTORE_BOOTSTRAP_TOKEN
+ };
+
// Checks if we have received a notice to turn on experimental datatypes
// (via the nigori node) and informs the frontend if that is the case.
// Note: it is illegal to call this before the backend is initialized.
@@ -397,7 +405,9 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// across browser restart to avoid requiring the user to re-enter their
// passphrase. |token| must be valid UTF-8 as we use the PrefService for
// storage.
- void PersistEncryptionBootstrapToken(const std::string& token);
+ void PersistEncryptionBootstrapToken(
+ const std::string& token,
+ BootstrapTokenType token_type);
// For convenience, checks if initialization state is INITIALIZED.
bool initialized() const { return initialization_state_ == INITIALIZED; }
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698