| Index: chrome/browser/sync/engine/all_status.cc
|
| diff --git a/chrome/browser/sync/engine/all_status.cc b/chrome/browser/sync/engine/all_status.cc
|
| index 2c2c37a7f09233a285cdd761a68ca9e6631558a7..4b2dbb0cc97753c8e1cb2bfbf985b30f1bc0c4af 100644
|
| --- a/chrome/browser/sync/engine/all_status.cc
|
| +++ b/chrome/browser/sync/engine/all_status.cc
|
| @@ -12,15 +12,16 @@
|
| #include "chrome/browser/sync/protocol/service_constants.h"
|
| #include "chrome/browser/sync/sessions/session_state.h"
|
| #include "chrome/browser/sync/syncable/directory_manager.h"
|
| +#include "chrome/browser/sync/syncable/model_type.h"
|
|
|
| namespace browser_sync {
|
|
|
| -static const sync_api::SyncManager::Status init_status =
|
| - { sync_api::SyncManager::Status::OFFLINE };
|
| -
|
| -AllStatus::AllStatus() : status_(init_status) {
|
| +AllStatus::AllStatus() {
|
| + status_.summary = sync_api::SyncManager::Status::OFFLINE;
|
| status_.initial_sync_ended = true;
|
| status_.notifications_enabled = false;
|
| + status_.cryptographer_ready = false;
|
| + status_.crypto_has_pending_keys = false;
|
| }
|
|
|
| AllStatus::~AllStatus() {
|
| @@ -165,6 +166,21 @@ void AllStatus::IncrementNotificationsReceived() {
|
| ++status_.notifications_received;
|
| }
|
|
|
| +void AllStatus::SetEncryptedTypes(const syncable::ModelTypeSet& types) {
|
| + ScopedStatusLock lock(this);
|
| + status_.encrypted_types = types;
|
| +}
|
| +
|
| +void AllStatus::SetCryptographerReady(bool ready) {
|
| + ScopedStatusLock lock(this);
|
| + status_.cryptographer_ready = ready;
|
| +}
|
| +
|
| +void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) {
|
| + ScopedStatusLock lock(this);
|
| + status_.crypto_has_pending_keys = has_pending_keys;
|
| +}
|
| +
|
| ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
|
| : allstatus_(allstatus) {
|
| allstatus->mutex_.Acquire();
|
|
|