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

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

Issue 7550023: [Sync] Add passphrase/encryption info to chrome://sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile 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
Index: chrome/browser/sync/engine/syncapi.cc
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc
index 229d3429318292478f51366840d7e527b4e0e875..a1b6a1576625c74e92154a62bb0a11897880aa6c 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1641,6 +1641,13 @@ SyncManager::Observer::~Observer() {}
SyncManager::SyncManager(const std::string& name)
: data_(new SyncInternal(name)) {}
+SyncManager::Status::Status()
+ : summary(INVALID) {
akalin 2011/08/04 01:14:48 All the vars are initialized by allstatus right?
Nicolas Zea 2011/08/04 01:27:52 Done.
+}
+
+SyncManager::Status::~Status() {
+}
+
bool SyncManager::Init(
const FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
@@ -1865,6 +1872,9 @@ bool SyncManager::SyncInternal::UpdateCryptographerFromNigori() {
OnPassphraseRequired(sync_api::REASON_DECRYPTION));
}
+ allstatus_.SetCryptographerReady(cryptographer->is_ready());
+ allstatus_.SetCryptoHasPendingKeys(cryptographer->has_pending_keys());
+
return cryptographer->is_ready();
}
@@ -2102,6 +2112,7 @@ void SyncManager::SyncInternal::EncryptDataTypes(
encrypted_types.begin(), encrypted_types.end(),
std::inserter(newly_encrypted_types,
newly_encrypted_types.begin()));
+ allstatus_.SetEncryptedTypes(newly_encrypted_types);
if (newly_encrypted_types == current_encrypted_types)
return; // Set of encrypted types did not change.
syncable::FillNigoriEncryptedTypes(newly_encrypted_types, &nigori);
@@ -2560,6 +2571,14 @@ void SyncManager::SyncInternal::OnSyncEngineEvent(
FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list,
OnPassphraseRequired(sync_api::REASON_ENCRYPTION));
}
+
+ allstatus_.SetCryptographerReady(cryptographer->is_ready());
+ allstatus_.SetCryptoHasPendingKeys(cryptographer->has_pending_keys());
+
+ syncable::ModelTypeSet encrypted_types =
akalin 2011/08/04 01:14:48 seems clearer to inline the call to GetEncryptedTy
Nicolas Zea 2011/08/04 01:27:52 Done.
+ cryptographer->GetEncryptedTypes();
+ allstatus_.SetEncryptedTypes(encrypted_types);
+
// If everything is in order(we have the passphrase) then there is no
// need to inform the listeners. They will just wait for sync
// completion event and if no errors have been raised it means

Powered by Google App Engine
This is Rietveld 408576698