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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 8491051: Do nothing in EnableEncryptEverything()if encryption already enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 cached_passphrases_.gaia_passphrase = passphrase; 1319 cached_passphrases_.gaia_passphrase = passphrase;
1320 } 1320 }
1321 } 1321 }
1322 } 1322 }
1323 1323
1324 void ProfileSyncService::EnableEncryptEverything() { 1324 void ProfileSyncService::EnableEncryptEverything() {
1325 // Tests override sync_initialized() to always return true, so we 1325 // Tests override sync_initialized() to always return true, so we
1326 // must check that instead of |backend_initialized_|. 1326 // must check that instead of |backend_initialized_|.
1327 // TODO(akalin): Fix the above. :/ 1327 // TODO(akalin): Fix the above. :/
1328 DCHECK(sync_initialized()); 1328 DCHECK(sync_initialized());
1329 encryption_pending_ = true; 1329 if (!encrypt_everything_)
1330 encryption_pending_ = true;
1330 } 1331 }
1331 1332
1332 bool ProfileSyncService::encryption_pending() const { 1333 bool ProfileSyncService::encryption_pending() const {
1333 // We may be called during the setup process before we're 1334 // We may be called during the setup process before we're
1334 // initialized (via IsEncryptedDatatypeEnabled and 1335 // initialized (via IsEncryptedDatatypeEnabled and
1335 // IsPassphraseRequiredForDecryption). 1336 // IsPassphraseRequiredForDecryption).
1336 return encryption_pending_; 1337 return encryption_pending_;
1337 } 1338 }
1338 1339
1339 bool ProfileSyncService::EncryptEverythingEnabled() const { 1340 bool ProfileSyncService::EncryptEverythingEnabled() const {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 << "Unrecoverable error."; 1544 << "Unrecoverable error.";
1544 } else { 1545 } else {
1545 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1546 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1546 << "initialized"; 1547 << "initialized";
1547 } 1548 }
1548 } 1549 }
1549 1550
1550 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1551 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1551 return failed_datatypes_handler_; 1552 return failed_datatypes_handler_;
1552 } 1553 }
OLDNEW
« 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