OLD | NEW |
---|---|
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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1333 } | 1333 } |
1334 | 1334 |
1335 void ProfileSyncService::SetEncryptEverything(bool encrypt_everything) { | 1335 void ProfileSyncService::SetEncryptEverything(bool encrypt_everything) { |
1336 // Tests override sync_initialized() to always return true, so we | 1336 // Tests override sync_initialized() to always return true, so we |
1337 // must check that instead of |backend_initialized_|. | 1337 // must check that instead of |backend_initialized_|. |
1338 // TODO(akalin): Fix the above. :/ | 1338 // TODO(akalin): Fix the above. :/ |
1339 DCHECK(sync_initialized()); | 1339 DCHECK(sync_initialized()); |
1340 encryption_pending_ = encrypt_everything; | 1340 encryption_pending_ = encrypt_everything; |
1341 // Callers shouldn't try to disable encrypt everything once it has | 1341 // Callers shouldn't try to disable encrypt everything once it has |
1342 // already succeeded. | 1342 // already succeeded. |
1343 DCHECK(!encrypt_everything_); | 1343 DCHECK(encrypt_everything || !encrypt_everything_); |
akalin
2011/10/27 20:11:34
this DCHECK should probably go above encryption_pe
Nicolas Zea
2011/10/27 20:54:10
Done.
| |
1344 } | 1344 } |
1345 | 1345 |
1346 bool ProfileSyncService::encryption_pending() const { | 1346 bool ProfileSyncService::encryption_pending() const { |
1347 // We may be called during the setup process before we're | 1347 // We may be called during the setup process before we're |
1348 // initialized (via IsEncryptedDatatypeEnabled and | 1348 // initialized (via IsEncryptedDatatypeEnabled and |
1349 // IsPassphraseRequiredForDecryption). | 1349 // IsPassphraseRequiredForDecryption). |
1350 return encryption_pending_; | 1350 return encryption_pending_; |
1351 } | 1351 } |
1352 | 1352 |
1353 bool ProfileSyncService::EncryptEverythingEnabled() const { | 1353 bool ProfileSyncService::EncryptEverythingEnabled() const { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1541 << "Unrecoverable error."; | 1541 << "Unrecoverable error."; |
1542 } else { | 1542 } else { |
1543 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " | 1543 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " |
1544 << "initialized"; | 1544 << "initialized"; |
1545 } | 1545 } |
1546 } | 1546 } |
1547 | 1547 |
1548 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { | 1548 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { |
1549 return failed_datatypes_handler_; | 1549 return failed_datatypes_handler_; |
1550 } | 1550 } |
OLD | NEW |