| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_METRICS_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_METRICS_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_METRICS_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_METRICS_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "components/ntp_snippets/category.h" | 12 #include "components/ntp_snippets/category.h" |
| 13 #include "ui/base/window_open_disposition.h" | 13 #include "ui/base/window_open_disposition.h" |
| 14 | 14 |
| 15 namespace ntp_snippets { | 15 namespace ntp_snippets { |
| 16 namespace metrics { | 16 namespace metrics { |
| 17 | 17 |
| 18 void OnPageShown( | 18 void OnPageShown( |
| 19 const std::vector<std::pair<Category, int>>& suggestions_per_category); | 19 const std::vector<std::pair<Category, int>>& suggestions_per_category, |
| 20 int visible_categories_count); |
| 20 | 21 |
| 21 // Should only be called once per NTP for each suggestion. | 22 // Should only be called once per NTP for each suggestion. |
| 22 void OnSuggestionShown(int global_position, | 23 void OnSuggestionShown(int global_position, |
| 23 Category category, | 24 Category category, |
| 24 int position_in_category, | 25 int position_in_category, |
| 25 base::Time publish_date, | 26 base::Time publish_date, |
| 26 float score, | 27 float score, |
| 27 base::Time fetch_date); | 28 base::Time fetch_date); |
| 28 | 29 |
| 29 // TODO(crbug.com/682160): Take struct, so that one could not mix up the | 30 // TODO(crbug.com/682160): Take struct, so that one could not mix up the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void RecordContentSuggestionDismissed(); | 64 void RecordContentSuggestionDismissed(); |
| 64 | 65 |
| 65 void RecordCategoryDismissed(); | 66 void RecordCategoryDismissed(); |
| 66 | 67 |
| 67 void RecordFetchAction(); | 68 void RecordFetchAction(); |
| 68 | 69 |
| 69 } // namespace metrics | 70 } // namespace metrics |
| 70 } // namespace ntp_snippets | 71 } // namespace ntp_snippets |
| 71 | 72 |
| 72 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ | 73 #endif // COMPONENTS_NTP_SNIPPETS_CONTENT_SUGGESTIONS_SERVICE_H_ |
| OLD | NEW |