summaryrefslogtreecommitdiffstats
path: root/components/sync_driver
diff options
context:
space:
mode:
authorstanisc <stanisc@chromium.org>2015-04-20 18:58:05 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-21 01:58:15 +0000
commit61d30ff987362c01b36ef8cf97d6875ccd7c8f4f (patch)
tree6024ee770dcaf352c6e1992cae63c24018348ab6 /components/sync_driver
parentff0b4f9b8ebddc84062bdb475464d7ae8355a86e (diff)
downloadchromium_src-61d30ff987362c01b36ef8cf97d6875ccd7c8f4f.zip
chromium_src-61d30ff987362c01b36ef8cf97d6875ccd7c8f4f.tar.gz
chromium_src-61d30ff987362c01b36ef8cf97d6875ccd7c8f4f.tar.bz2
Renamed Sync.*StartFailure to Sync.*ConfigureFailure and changed the enum type.
BUG=478226 Review URL: https://codereview.chromium.org/1098583003 Cr-Commit-Position: refs/heads/master@{#325968}
Diffstat (limited to 'components/sync_driver')
-rw-r--r--components/sync_driver/data_type_controller.h4
-rw-r--r--components/sync_driver/non_ui_data_type_controller.cc6
-rw-r--r--components/sync_driver/ui_data_type_controller.cc6
3 files changed, 9 insertions, 7 deletions
diff --git a/components/sync_driver/data_type_controller.h b/components/sync_driver/data_type_controller.h
index dd645b3..258e9b7 100644
--- a/components/sync_driver/data_type_controller.h
+++ b/components/sync_driver/data_type_controller.h
@@ -51,6 +51,8 @@ class DataTypeController
// so it is disabled waiting for it to be stopped.
};
+ // This enum is used for "Sync.*ConfigureFailre" histograms so the order
+ // of is important. Any changes need to be reflected in histograms.xml.
enum ConfigureResult {
OK, // The data type has started normally.
OK_FIRST_RUN, // Same as OK, but sent on first successful
@@ -62,7 +64,7 @@ class DataTypeController
NEEDS_CRYPTO, // The data type cannot be started yet because it
// depends on the cryptographer.
RUNTIME_ERROR, // After starting, a runtime error was encountered.
- MAX_START_RESULT
+ MAX_CONFIGURE_RESULT
};
typedef base::Callback<void(ConfigureResult,
diff --git a/components/sync_driver/non_ui_data_type_controller.cc b/components/sync_driver/non_ui_data_type_controller.cc
index 2867ed9..df189b0 100644
--- a/components/sync_driver/non_ui_data_type_controller.cc
+++ b/components/sync_driver/non_ui_data_type_controller.cc
@@ -241,9 +241,9 @@ void NonUIDataTypeController::RecordStartFailure(ConfigureResult result) {
UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures",
ModelTypeToHistogramInt(type()),
syncer::MODEL_TYPE_COUNT);
-#define PER_DATA_TYPE_MACRO(type_str) \
- UMA_HISTOGRAM_ENUMERATION("Sync." type_str "StartFailure", result, \
- MAX_START_RESULT);
+#define PER_DATA_TYPE_MACRO(type_str) \
+ UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \
+ MAX_CONFIGURE_RESULT);
SYNC_DATA_TYPE_HISTOGRAM(type());
#undef PER_DATA_TYPE_MACRO
}
diff --git a/components/sync_driver/ui_data_type_controller.cc b/components/sync_driver/ui_data_type_controller.cc
index 50d5767..16d855c 100644
--- a/components/sync_driver/ui_data_type_controller.cc
+++ b/components/sync_driver/ui_data_type_controller.cc
@@ -381,9 +381,9 @@ void UIDataTypeController::RecordStartFailure(ConfigureResult result) {
UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures",
ModelTypeToHistogramInt(type()),
syncer::MODEL_TYPE_COUNT);
-#define PER_DATA_TYPE_MACRO(type_str) \
- UMA_HISTOGRAM_ENUMERATION("Sync." type_str "StartFailure", result, \
- MAX_START_RESULT);
+#define PER_DATA_TYPE_MACRO(type_str) \
+ UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \
+ MAX_CONFIGURE_RESULT);
SYNC_DATA_TYPE_HISTOGRAM(type());
#undef PER_DATA_TYPE_MACRO
}