summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/sync/profile_sync_service.cc4
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.cc13
2 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 5c17fb0..f183ea6 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1694,9 +1694,6 @@ void ProfileSyncService::SetEncryptionPassphrase(const std::string& passphrase,
passphrase_required_reason_ == syncer::REASON_DECRYPTION)) <<
"Can not set explicit passphrase when decryption is needed.";
- if (type == EXPLICIT)
- UMA_HISTOGRAM_BOOLEAN("Sync.CustomPassphrase", true);
-
DVLOG(1) << "Setting " << (type == EXPLICIT ? "explicit" : "implicit")
<< " passphrase for encryption.";
if (passphrase_required_reason_ == syncer::REASON_ENCRYPTION) {
@@ -1732,7 +1729,6 @@ void ProfileSyncService::EnableEncryptEverything() {
// problems around cancelling encryption in the background (crbug.com/119649).
if (!encrypt_everything_)
encryption_pending_ = true;
- UMA_HISTOGRAM_BOOLEAN("Sync.EncryptAllData", true);
}
bool ProfileSyncService::encryption_pending() const {
diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc
index adc4ef2..3d0264c 100644
--- a/sync/internal_api/sync_encryption_handler_impl.cc
+++ b/sync/internal_api/sync_encryption_handler_impl.cc
@@ -356,6 +356,10 @@ void SyncEncryptionHandlerImpl::SetEncryptionPassphrase(
// Will fail if we already have an explicit passphrase or we have pending
// keys.
SetCustomPassphrase(passphrase, &trans, &node);
+
+ // When keystore migration occurs, the "CustomEncryption" UMA stat must be
+ // logged as true.
+ UMA_HISTOGRAM_BOOLEAN("Sync.CustomEncryption", true);
return;
}
@@ -403,6 +407,15 @@ void SyncEncryptionHandlerImpl::SetEncryptionPassphrase(
DVLOG(1) << "Setting implicit passphrase for encryption.";
}
cryptographer->GetBootstrapToken(&bootstrap_token);
+
+ // With M26, sync accounts can be in only one of two encryption states:
+ // 1) Encrypt only passwords with an implicit passphrase.
+ // 2) Encrypt all sync datatypes with an explicit passphrase.
+ // We deprecate the "EncryptAllData" and "CustomPassphrase" histograms,
+ // and keep track of an account's encryption state via the
+ // "CustomEncryption" histogram. See http://crbug.com/131478.
+ UMA_HISTOGRAM_BOOLEAN("Sync.CustomEncryption", is_explicit);
+
success = true;
} else {
NOTREACHED() << "Failed to add key to cryptographer.";