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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 665223007: Add a flag to ProfileSyncService that says whether encrypting all data is allowed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 5c894efdc6a686edd944f1263b7dc51afaf672eb..893e2c44bd695bff7a46fc4114d24b39e2e5756d 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -375,7 +375,7 @@ void SyncSetupHandler::DisplayConfigureSync(bool show_advanced,
args.SetBoolean("syncAllDataTypes", sync_prefs.HasKeepEverythingSynced());
args.SetBoolean("syncNothing", false); // Always false during initial setup.
args.SetBoolean("encryptAllData", service->EncryptEverythingEnabled());
- args.SetBoolean("isSupervised", GetProfile()->IsSupervised());
+ args.SetBoolean("encryptAllDataAllowed", service->EncryptEverythingAllowed());
// We call IsPassphraseRequired() here, instead of calling
// IsPassphraseRequiredForDecryption(), because we want to show the passphrase
@@ -682,9 +682,10 @@ void SyncSetupHandler::HandleConfigure(const base::ListValue* args) {
return;
}
- // Don't allow supervised users to enable "encrypt all". The UI is hidden,
- // but the user may have enabled it e.g. by fiddling with the web inspector.
- if (GetProfile()->IsSupervised())
+ // Don't allow "encrypt all" if the ProfileSyncService doesn't allow it.
+ // The UI is hidden, but the user may have enabled it e.g. by fiddling with
+ // the web inspector.
+ if (!service->EncryptEverythingAllowed())
configuration.encrypt_all = false;
// Note: Data encryption will not occur until configuration is complete
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.h ('k') | chrome/browser/ui/webui/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698