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

Side by Side Diff: chrome/browser/previews/previews_infobar_delegate.h

Issue 2949173002: UMA for the Stale Previews timestamp (Closed)
Patch Set: comments Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 17 matching lines...) Expand all
28 enum PreviewsInfoBarAction { 28 enum PreviewsInfoBarAction {
29 INFOBAR_SHOWN = 0, 29 INFOBAR_SHOWN = 0,
30 INFOBAR_LOAD_ORIGINAL_CLICKED = 1, 30 INFOBAR_LOAD_ORIGINAL_CLICKED = 1,
31 INFOBAR_DISMISSED_BY_USER = 2, 31 INFOBAR_DISMISSED_BY_USER = 2,
32 INFOBAR_DISMISSED_BY_NAVIGATION = 3, 32 INFOBAR_DISMISSED_BY_NAVIGATION = 3,
33 INFOBAR_DISMISSED_BY_RELOAD = 4, 33 INFOBAR_DISMISSED_BY_RELOAD = 4,
34 INFOBAR_DISMISSED_BY_TAB_CLOSURE = 5, 34 INFOBAR_DISMISSED_BY_TAB_CLOSURE = 5,
35 INFOBAR_INDEX_BOUNDARY 35 INFOBAR_INDEX_BOUNDARY
36 }; 36 };
37 37
38 // Values of the UMA Previews.InfoBarTimestamp histogram. This enum must
39 // remain synchronized with the enum of the same name in
40 // metrics/histograms/histograms.xml.
41 enum PreviewsInfoBarTimestamp {
42 TIMESTAMP_SHOWN = 0,
43 TIMESTAMP_NOT_SHOWN_PREVIEW_NOT_STALE = 1,
44 TIMESTAMP_NOT_SHOWN_STALENESS_NEGATIVE = 2,
45 TIMESTAMP_NOT_SHOWN_STALENESS_GREATER_THAN_MAX = 3,
46 TIMESTAMP_INDEX_BOUNDARY
47 };
48
38 ~PreviewsInfoBarDelegate() override; 49 ~PreviewsInfoBarDelegate() override;
39 50
40 // Creates a preview infobar and corresponding delegate and adds the infobar 51 // Creates a preview infobar and corresponding delegate and adds the infobar
41 // to InfoBarService. 52 // to InfoBarService.
42 static void Create( 53 static void Create(
43 content::WebContents* web_contents, 54 content::WebContents* web_contents,
44 previews::PreviewsType previews_type, 55 previews::PreviewsType previews_type,
45 base::Time previews_freshness, 56 base::Time previews_freshness,
46 bool is_data_saver_user, 57 bool is_data_saver_user,
47 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); 58 const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
(...skipping 27 matching lines...) Expand all
75 mutable PreviewsInfoBarAction infobar_dismissed_action_; 86 mutable PreviewsInfoBarAction infobar_dismissed_action_;
76 87
77 const base::string16 message_text_; 88 const base::string16 message_text_;
78 89
79 OnDismissPreviewsInfobarCallback on_dismiss_callback_; 90 OnDismissPreviewsInfobarCallback on_dismiss_callback_;
80 91
81 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); 92 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate);
82 }; 93 };
83 94
84 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 95 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698