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

Unified Diff: chrome/browser/sync/engine/all_status.cc

Issue 7550023: [Sync] Add passphrase/encryption info to chrome://sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 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 | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/syncapi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/syncapi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698