diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 00:31:14 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 00:31:14 +0000 |
commit | 5efe8d3367b15284274bf39f73c6ef725a0ada7c (patch) | |
tree | efd5307cc1a669e53839eb61822a290270463b4b /sync | |
parent | a0c1d77b74c1f610511ebfda8e155ce0891fbb46 (diff) | |
download | chromium_src-5efe8d3367b15284274bf39f73c6ef725a0ada7c.zip chromium_src-5efe8d3367b15284274bf39f73c6ef725a0ada7c.tar.gz chromium_src-5efe8d3367b15284274bf39f73c6ef725a0ada7c.tar.bz2 |
[sync] Fix UMA tracking of sync encryption state
With r128510, all the sync UMA tracking logic was moved from
sync_setup_flow.cc to profile_sync_service.cc. The logic for
EncryptAll/CustomPassphrase ended up being changed from their
values being logged for both, the true and the false case, to being
logged only for the true case.
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.
In addition, when accounts go through keystore migration, their
encryption state defaults to custom encryption.
This patch deprecates the "EncryptAllData" and "CustomPassphrase"
histograms, and keeps track of an account's encryption state via the
"CustomEncryption" histogram.
The internal file histograms.xml will be updated after this patch is
landed, in order to mark the EncryptAllData and CustomPassphrase
histograms as obsolete and to add the CustomEncryption histogram.
BUG=131478
TEST=Check about:histograms when sync is set up for the first time for
an account via the NTP flow, or when encryption is (re)configured via
the advanced setup dialog.
Review URL: https://codereview.chromium.org/12316114
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r-- | sync/internal_api/sync_encryption_handler_impl.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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."; |