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

Unified Diff: content/browser/web_contents/aura/types.cc

Issue 2986483002: Adding metrics logging for Simplified Gesture Navigation. (Closed)
Patch Set: Rebase Created 3 years, 5 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 | « content/browser/web_contents/aura/types.h ('k') | content/browser/web_contents/aura/uma_navigation_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/aura/types.cc
diff --git a/content/browser/web_contents/aura/types.cc b/content/browser/web_contents/aura/types.cc
new file mode 100644
index 0000000000000000000000000000000000000000..77d32402b3e4598a53a583e48e68e94c72209f12
--- /dev/null
+++ b/content/browser/web_contents/aura/types.cc
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/web_contents/aura/types.h"
+
+namespace content {
+
+UmaNavigationType GetUmaNavigationType(NavigationDirection direction,
+ OverscrollSource source) {
+ if (direction == NavigationDirection::NONE ||
+ source == OverscrollSource::NONE) {
+ return NAVIGATION_TYPE_NONE;
+ }
+ if (direction == NavigationDirection::BACK) {
+ return source == OverscrollSource::TOUCHPAD
+ ? UmaNavigationType::BACK_TOUCHPAD
+ : UmaNavigationType::BACK_TOUCHSCREEN;
+ }
+ DCHECK_EQ(direction, NavigationDirection::FORWARD);
+ return source == OverscrollSource::TOUCHPAD
+ ? UmaNavigationType::FORWARD_TOUCHPAD
+ : UmaNavigationType::FORWARD_TOUCHSCREEN;
+}
+
+} // namespace content
« no previous file with comments | « content/browser/web_contents/aura/types.h ('k') | content/browser/web_contents/aura/uma_navigation_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698