Commit 811c32b6 authored by zea@chromium.org's avatar zea@chromium.org

[Sync] Fix dcheck when setting sync encryption.

It's valid to call SetEncryptEverything after turning on encryption as long
as you're not trying to turn it off.

BUG=none
TEST=set a custom passphrase after turning on encryption


Review URL: http://codereview.chromium.org/8416008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107650 0039d316-1c4b-4281-b951-d872f2087c98
parent 15e1e434
...@@ -1337,10 +1337,11 @@ void ProfileSyncService::SetEncryptEverything(bool encrypt_everything) { ...@@ -1337,10 +1337,11 @@ void ProfileSyncService::SetEncryptEverything(bool encrypt_everything) {
// must check that instead of |backend_initialized_|. // must check that instead of |backend_initialized_|.
// TODO(akalin): Fix the above. :/ // TODO(akalin): Fix the above. :/
DCHECK(sync_initialized()); DCHECK(sync_initialized());
encryption_pending_ = encrypt_everything;
// Callers shouldn't try to disable encrypt everything once it has // Callers shouldn't try to disable encrypt everything once it has
// already succeeded. // already succeeded.
DCHECK(!encrypt_everything_); if (!encrypt_everything)
DCHECK(!encrypt_everything_);
encryption_pending_ = encrypt_everything;
} }
bool ProfileSyncService::encryption_pending() const { bool ProfileSyncService::encryption_pending() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment