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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 8416008: [Sync] Fix dcheck when setting sync encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 123c80fecbb0955583245862c980fdb43f6ac0e1..de7e1c75a5c5bd183cf7249463419d22cd318593 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1337,10 +1337,11 @@ void ProfileSyncService::SetEncryptEverything(bool encrypt_everything) {
// must check that instead of |backend_initialized_|.
// TODO(akalin): Fix the above. :/
DCHECK(sync_initialized());
- encryption_pending_ = encrypt_everything;
// Callers shouldn't try to disable encrypt everything once it has
// already succeeded.
- DCHECK(!encrypt_everything_);
+ if (!encrypt_everything)
+ DCHECK(!encrypt_everything_);
+ encryption_pending_ = encrypt_everything;
}
bool ProfileSyncService::encryption_pending() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698