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

Side by Side Diff: sync/internal_api/public/sync_manager.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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 int sync_server_port, 374 int sync_server_port,
375 bool use_ssl, 375 bool use_ssl,
376 const scoped_refptr<base::TaskRunner>& blocking_task_runner, 376 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
377 scoped_ptr<HttpPostProviderFactory> post_factory, 377 scoped_ptr<HttpPostProviderFactory> post_factory,
378 const std::vector<ModelSafeWorker*>& workers, 378 const std::vector<ModelSafeWorker*>& workers,
379 ExtensionsActivityMonitor* extensions_activity_monitor, 379 ExtensionsActivityMonitor* extensions_activity_monitor,
380 ChangeDelegate* change_delegate, 380 ChangeDelegate* change_delegate,
381 const SyncCredentials& credentials, 381 const SyncCredentials& credentials,
382 scoped_ptr<SyncNotifier> sync_notifier, 382 scoped_ptr<SyncNotifier> sync_notifier,
383 const std::string& restored_key_for_bootstrapping, 383 const std::string& restored_key_for_bootstrapping,
384 const std::string& restored_keystore_key_for_bootstrapping,
384 bool keystore_encryption_enabled, 385 bool keystore_encryption_enabled,
385 scoped_ptr<InternalComponentsFactory> internal_components_factory, 386 scoped_ptr<InternalComponentsFactory> internal_components_factory,
386 Encryptor* encryptor, 387 Encryptor* encryptor,
387 UnrecoverableErrorHandler* unrecoverable_error_handler, 388 UnrecoverableErrorHandler* unrecoverable_error_handler,
388 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0; 389 ReportUnrecoverableErrorFunction report_unrecoverable_error_function) = 0;
389 390
390 // Throw an unrecoverable error from a transaction (mostly used for 391 // Throw an unrecoverable error from a transaction (mostly used for
391 // testing). 392 // testing).
392 virtual void ThrowUnrecoverableError() = 0; 393 virtual void ThrowUnrecoverableError() = 0;
393 394
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // potentially dereference garbage. 458 // potentially dereference garbage.
458 virtual void RemoveObserver(Observer* observer) = 0; 459 virtual void RemoveObserver(Observer* observer) = 0;
459 460
460 // Status-related getter. May be called on any thread. 461 // Status-related getter. May be called on any thread.
461 virtual SyncStatus GetDetailedStatus() const = 0; 462 virtual SyncStatus GetDetailedStatus() const = 0;
462 463
463 // Whether or not the Nigori node is encrypted using an explicit passphrase. 464 // Whether or not the Nigori node is encrypted using an explicit passphrase.
464 // May be called on any thread. 465 // May be called on any thread.
465 virtual bool IsUsingExplicitPassphrase() = 0; 466 virtual bool IsUsingExplicitPassphrase() = 0;
466 467
468 // Extracts the keystore encryption bootstrap token if a keystore key existed.
469 // Returns true if bootstrap token successfully extracted, false otherwise.
470 virtual bool GetKeystoreKeyBootstrapToken(std::string* token) = 0;
471
467 // Call periodically from a database-safe thread to persist recent changes 472 // Call periodically from a database-safe thread to persist recent changes
468 // to the syncapi model. 473 // to the syncapi model.
469 virtual void SaveChanges() = 0; 474 virtual void SaveChanges() = 0;
470 475
471 // Initiates shutdown of various components in the sync engine. Must be 476 // Initiates shutdown of various components in the sync engine. Must be
472 // called from the main thread to allow preempting ongoing tasks on the sync 477 // called from the main thread to allow preempting ongoing tasks on the sync
473 // loop (that may be blocked on I/O). The semantics of |callback| are the 478 // loop (that may be blocked on I/O). The semantics of |callback| are the
474 // same as with StartConfigurationMode. If provided and a scheduler / sync 479 // same as with StartConfigurationMode. If provided and a scheduler / sync
475 // loop exists, it will be invoked from the sync loop by the scheduler to 480 // loop exists, it will be invoked from the sync loop by the scheduler to
476 // notify that all work has been flushed + cancelled, and it is idle. 481 // notify that all work has been flushed + cancelled, and it is idle.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 virtual bool ReceivedExperiment(Experiments* experiments) = 0; 520 virtual bool ReceivedExperiment(Experiments* experiments) = 0;
516 521
517 // Uses a read-only transaction to determine if the directory being synced has 522 // Uses a read-only transaction to determine if the directory being synced has
518 // any remaining unsynced items. May be called on any thread. 523 // any remaining unsynced items. May be called on any thread.
519 virtual bool HasUnsyncedItems() = 0; 524 virtual bool HasUnsyncedItems() = 0;
520 }; 525 };
521 526
522 } // namespace syncer 527 } // namespace syncer
523 528
524 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 529 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698