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

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

Issue 14139010: Disable history delete directives when sessions are encrypted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get it working. Created 7 years, 8 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 | chrome/browser/sync/sync_prefs.cc » ('j') | 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 b3d6c949226f287a9032e9be27f8924b492f4862..289917726b4bd77763f2a9af6084a8f1cb29b53c 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1117,6 +1117,15 @@ void ProfileSyncService::OnEncryptedTypesChanged(
<< " (encrypt everything is set to "
<< (encrypt_everything_ ? "true" : "false") << ")";
DCHECK(encrypted_types_.Has(syncer::PASSWORDS));
+
+ // If sessions are encrypted, full history sync is not possible, and
+ // delete directives are unnecessary.
+ if (GetPreferredDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES) &&
+ encrypted_types_.Has(syncer::SESSIONS)) {
+ DisableBrokenDatatype(syncer::HISTORY_DELETE_DIRECTIVES,
+ FROM_HERE,
+ "Delete directives not supported with encryption.");
+ }
}
void ProfileSyncService::OnEncryptionComplete() {
« no previous file with comments | « no previous file | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698