| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/bookmarks/bookmark_stats.h" | 5 #include "chrome/browser/bookmarks/bookmark_stats.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "components/bookmarks/core/browser/bookmark_model.h" | 8 #include "components/bookmarks/browser/bookmark_model.h" |
| 9 #include "content/public/browser/user_metrics.h" | 9 #include "content/public/browser/user_metrics.h" |
| 10 | 10 |
| 11 void RecordBookmarkLaunch(const BookmarkNode* node, | 11 void RecordBookmarkLaunch(const BookmarkNode* node, |
| 12 BookmarkLaunchLocation location) { | 12 BookmarkLaunchLocation location) { |
| 13 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || | 13 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || |
| 14 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { | 14 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { |
| 15 content::RecordAction( | 15 content::RecordAction( |
| 16 base::UserMetricsAction("ClickedBookmarkBarURLButton")); | 16 base::UserMetricsAction("ClickedBookmarkBarURLButton")); |
| 17 } | 17 } |
| 18 UMA_HISTOGRAM_ENUMERATION( | 18 UMA_HISTOGRAM_ENUMERATION( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location) { | 43 void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location) { |
| 44 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || | 44 if (location == BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR || |
| 45 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { | 45 location == BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR) { |
| 46 content::RecordAction( | 46 content::RecordAction( |
| 47 base::UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); | 47 base::UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); |
| 48 } | 48 } |
| 49 } | 49 } |
| OLD | NEW |