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

Unified Diff: components/sync_driver/device_info_sync_service.cc

Issue 2078663002: [Sync] Deprecate old histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Leave old enum usage Created 4 years, 6 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: components/sync_driver/device_info_sync_service.cc
diff --git a/components/sync_driver/device_info_sync_service.cc b/components/sync_driver/device_info_sync_service.cc
index 879d4d824805774c92898e3eb8cbfcf4886662d4..22b8d8fa7ba275c9908cee1d8f8b272d9aaf12f5 100644
--- a/components/sync_driver/device_info_sync_service.cc
+++ b/components/sync_driver/device_info_sync_service.cc
@@ -10,7 +10,6 @@
#include <utility>
#include "base/memory/ptr_util.h"
-#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "components/sync_driver/device_info_util.h"
#include "components/sync_driver/local_device_info_provider.h"
@@ -31,38 +30,6 @@ using syncer::SyncDataList;
using syncer::SyncErrorFactory;
using syncer::SyncMergeResult;
-namespace {
-
-// TODO(pavely): Remove histogram once device_id mismatch is understood
-// (crbug/481596).
-// When signin_scoped_device_id from pref doesn't match the one in
-// DeviceInfoSpecfics record histogram telling if sync or pref copy was empty.
-// This will indicate how often such mismatch happens and what was the state
-// before.
-enum DeviceIdMismatchForHistogram {
- DEVICE_ID_MISMATCH_BOTH_NONEMPTY = 0,
- DEVICE_ID_MISMATCH_SYNC_EMPTY,
- DEVICE_ID_MISMATCH_PREF_EMPTY,
- DEVICE_ID_MISMATCH_COUNT,
-};
-
-void RecordDeviceIdChangedHistogram(const std::string& device_id_from_sync,
- const std::string& device_id_from_pref) {
- DCHECK(device_id_from_sync != device_id_from_pref);
- DeviceIdMismatchForHistogram device_id_mismatch_for_histogram =
- DEVICE_ID_MISMATCH_BOTH_NONEMPTY;
- if (device_id_from_sync.empty()) {
- device_id_mismatch_for_histogram = DEVICE_ID_MISMATCH_SYNC_EMPTY;
- } else if (device_id_from_pref.empty()) {
- device_id_mismatch_for_histogram = DEVICE_ID_MISMATCH_PREF_EMPTY;
- }
- UMA_HISTOGRAM_ENUMERATION("Sync.DeviceIdMismatchDetails",
- device_id_mismatch_for_histogram,
- DEVICE_ID_MISMATCH_COUNT);
-}
-
-} // namespace
-
DeviceInfoSyncService::DeviceInfoSyncService(
LocalDeviceInfoProvider* local_device_info_provider)
: local_device_info_provider_(local_device_info_provider) {
@@ -114,15 +81,6 @@ SyncMergeResult DeviceInfoSyncService::MergeDataAndStartSyncing(
std::unique_ptr<DeviceInfo> synced_local_device_info =
base::WrapUnique(CreateDeviceInfo(*iter));
- // TODO(pavely): Remove histogram once device_id mismatch is understood
- // (crbug/481596).
- if (synced_local_device_info->signin_scoped_device_id() !=
- local_device_info->signin_scoped_device_id()) {
- RecordDeviceIdChangedHistogram(
- synced_local_device_info->signin_scoped_device_id(),
- local_device_info->signin_scoped_device_id());
- }
-
pulse_delay = DeviceInfoUtil::CalculatePulseDelay(
GetLastUpdateTime(*iter), Time::Now());
// Store the synced device info for the local device only if
« no previous file with comments | « components/browser_sync/browser/profile_sync_service.cc ('k') | components/sync_driver/glue/sync_backend_host_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698