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

Side by Side Diff: ios/chrome/browser/ui/contextual_search/contextual_search_metrics.h

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_METRICS_H_
6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_METRICS_H_
7
8 #import "base/time/time.h"
9 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h"
10 #import "ios/chrome/browser/ui/contextual_search/panel_configuration.h"
11 #import "ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_med iator.h"
12
13 namespace ContextualSearch {
14
15 // Record the contextual search pref state at startup.
16 void RecordPreferenceState(TouchToSearch::TouchToSearchPreferenceState state);
17
18 // Record when the contextual search preference changes; if |enabled| then the
19 // preference was turned on. Notes that RecordFirstRunFlowOutcome() should be
20 // used instead after the first run flow.
21 void RecordPreferenceChanged(bool enabled);
22
23 // Record the contextual search pref state after the first run flow completes.
24 void RecordFirstRunFlowOutcome(
25 TouchToSearch::TouchToSearchPreferenceState state);
26
27 // Record the time between the start of a new search and showing the search
28 // results.
29 void RecordDuration(bool resultsSeen, bool chained, base::TimeDelta duration);
30
31 // Record the time between the user tapping and starting a search.
32 void RecordTimeToSearch(base::TimeDelta duration);
33
34 // Record whether the first run flow's panel was seen during the contextual
35 // search. This should only be called when the user exits the search still
36 // in the undecided state. |seen| should be true if the user saw the first
37 // run flow view, or false if they didn't (for example, if they had not yet
38 // opted in, triggered a search, and then dismissed the panel).
39 void RecordFirstRunPanelSeen(bool seen);
40
41 // Record that the search results generated by a tap were created, and if the
42 // user saw them.
43 void RecordTapResultsSeen(bool seen);
44
45 // Record that the search results generated by a long-press selection were
46 // created, and if the user saw them.
47 void RecordSelectionResultsSeen(bool seen);
48
49 // Record when a user makes a tap, if it resulted in a valid selection.
50 void RecordSelectionIsValid(bool valid);
51
52 // Record the first time the panel enters |to_state|, which state it came from
53 // and why.
54 void RecordFirstStateEntry(PanelState from_state,
55 PanelState to_state,
56 StateChangeReason reason);
57
58 // Record the first time the panel exits |from_state|, which state it changed
59 // to and why.
60 void RecordFirstStateExit(PanelState from_state,
61 PanelState to_state,
62 StateChangeReason reason);
63
64 } // namespace ContextualSearch
65
66 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698