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

Unified Diff: chromecast/base/metrics/cast_metrics_helper.cc

Issue 1510973007: [Chromecast] Set dummy metrics session ID for browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + use GUID format for dummy session ID Created 4 years, 10 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
« no previous file with comments | « chromecast/base/metrics/cast_metrics_helper.h ('k') | chromecast/browser/test/chromecast_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/base/metrics/cast_metrics_helper.cc
diff --git a/chromecast/base/metrics/cast_metrics_helper.cc b/chromecast/base/metrics/cast_metrics_helper.cc
index 9680c8006ed252c19b7e4cfccc6b333c3c3bcfc2..8f12042b6d81b92d5b10c16f7b3112f5336d7712 100644
--- a/chromecast/base/metrics/cast_metrics_helper.cc
+++ b/chromecast/base/metrics/cast_metrics_helper.cc
@@ -91,7 +91,6 @@ CastMetricsHelper* CastMetricsHelper::GetInstance() {
CastMetricsHelper::CastMetricsHelper(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: task_runner_(task_runner),
- session_id_("00000000000000000000000000000000"),
metrics_sink_(NULL),
logged_first_audio_(false),
record_action_callback_(base::Bind(&base::RecordComputedAction)) {
@@ -227,6 +226,11 @@ void CastMetricsHelper::SetRecordActionCallback(
record_action_callback_ = callback;
}
+void CastMetricsHelper::SetDummySessionIdForTesting() {
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ session_id_ = "00000000-0000-0000-0000-000000000000";
+}
+
void CastMetricsHelper::RecordSimpleAction(const std::string& action) {
MAKE_SURE_THREAD(RecordSimpleAction, action);
« no previous file with comments | « chromecast/base/metrics/cast_metrics_helper.h ('k') | chromecast/browser/test/chromecast_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698