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

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: 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/syncapi.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..465be68d256319dabdeafac9cb7ef76ac73bb322 100644
--- a/chrome/browser/sync/engine/syncapi.cc
+++ b/chrome/browser/sync/engine/syncapi.cc
@@ -1641,6 +1641,12 @@ SyncManager::Observer::~Observer() {}
SyncManager::SyncManager(const std::string& name)
: data_(new SyncInternal(name)) {}
+SyncManager::Status::Status() {
+}
+
+SyncManager::Status::~Status() {
+}
+
bool SyncManager::Init(
const FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
@@ -1865,6 +1871,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 +2111,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 +2570,11 @@ 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());
+ allstatus_.SetEncryptedTypes(cryptographer->GetEncryptedTypes());
+
// 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
« no previous file with comments | « chrome/browser/sync/engine/syncapi.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698