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

Side by Side Diff: chrome/browser/omnibox/omnibox_log.h

Issue 795343002: Omnibox Watcher: Don't Flag Incidents that are Paste+Enter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in comment Created 6 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
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 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_ 5 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_ 6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "components/metrics/proto/omnibox_event.pb.h" 12 #include "components/metrics/proto/omnibox_event.pb.h"
13 #include "components/metrics/proto/omnibox_input_type.pb.h" 13 #include "components/metrics/proto/omnibox_input_type.pb.h"
14 #include "components/omnibox/autocomplete_provider.h" 14 #include "components/omnibox/autocomplete_provider.h"
15 #include "components/sessions/session_id.h" 15 #include "components/sessions/session_id.h"
16 16
17 class AutocompleteResult; 17 class AutocompleteResult;
18 18
19 // The data to log (via the metrics service) when the user selects an item from 19 // The data to log (via the metrics service) when the user selects an item from
20 // the omnibox popup. 20 // the omnibox popup.
21 struct OmniboxLog { 21 struct OmniboxLog {
22 OmniboxLog( 22 OmniboxLog(
23 const base::string16& text, 23 const base::string16& text,
24 bool just_deleted_text, 24 bool just_deleted_text,
25 metrics::OmniboxInputType::Type input_type, 25 metrics::OmniboxInputType::Type input_type,
26 bool is_popup_open, 26 bool is_popup_open,
27 size_t selected_index, 27 size_t selected_index,
28 bool is_paste_and_go, 28 bool is_paste_and_go,
29 bool last_action_was_paste,
29 SessionID::id_type tab_id, 30 SessionID::id_type tab_id,
30 metrics::OmniboxEventProto::PageClassification 31 metrics::OmniboxEventProto::PageClassification
31 current_page_classification, 32 current_page_classification,
32 base::TimeDelta elapsed_time_since_user_first_modified_omnibox, 33 base::TimeDelta elapsed_time_since_user_first_modified_omnibox,
33 size_t completed_length, 34 size_t completed_length,
34 base::TimeDelta elapsed_time_since_last_change_to_default_match, 35 base::TimeDelta elapsed_time_since_last_change_to_default_match,
35 const AutocompleteResult& result); 36 const AutocompleteResult& result);
36 ~OmniboxLog(); 37 ~OmniboxLog();
37 38
38 // The user's input text in the omnibox. 39 // The user's input text in the omnibox.
(...skipping 10 matching lines...) Expand all
49 bool is_popup_open; 50 bool is_popup_open;
50 51
51 // The index of the item selected in the dropdown list. Set to 0 if the 52 // The index of the item selected in the dropdown list. Set to 0 if the
52 // dropdown is closed (and therefore there is only one implicit suggestion). 53 // dropdown is closed (and therefore there is only one implicit suggestion).
53 size_t selected_index; 54 size_t selected_index;
54 55
55 // True if this is a paste-and-search or paste-and-go omnibox interaction. 56 // True if this is a paste-and-search or paste-and-go omnibox interaction.
56 // (The codebase refers to both these types as paste-and-go.) 57 // (The codebase refers to both these types as paste-and-go.)
57 bool is_paste_and_go; 58 bool is_paste_and_go;
58 59
60 // True if the last action was a PASTE or if (somehow) we're still in the
grt (UTC plus 2) 2014/12/12 14:43:49 nit: rewrite comment without "we're"
Mark P 2014/12/12 20:44:33 Done.
61 // act of pasting.
62 bool last_action_was_paste;
63
59 // ID of the tab the selected autocomplete suggestion was opened in. 64 // ID of the tab the selected autocomplete suggestion was opened in.
60 // Set to -1 if we haven't yet determined the destination tab. 65 // Set to -1 if we haven't yet determined the destination tab.
61 SessionID::id_type tab_id; 66 SessionID::id_type tab_id;
62 67
63 // The type of page (e.g., new tab page, regular web page) that the 68 // The type of page (e.g., new tab page, regular web page) that the
64 // user was viewing before going somewhere with the omnibox. 69 // user was viewing before going somewhere with the omnibox.
65 metrics::OmniboxEventProto::PageClassification current_page_classification; 70 metrics::OmniboxEventProto::PageClassification current_page_classification;
66 71
67 // The amount of time since the user first began modifying the text 72 // The amount of time since the user first began modifying the text
68 // in the omnibox. If at some point after modifying the text, the 73 // in the omnibox. If at some point after modifying the text, the
(...skipping 22 matching lines...) Expand all
91 // Result set. 96 // Result set.
92 const AutocompleteResult& result; 97 const AutocompleteResult& result;
93 98
94 // Diagnostic information from providers. See 99 // Diagnostic information from providers. See
95 // AutocompleteController::AddProvidersInfo() and 100 // AutocompleteController::AddProvidersInfo() and
96 // AutocompleteProvider::AddProviderInfo() above. 101 // AutocompleteProvider::AddProviderInfo() above.
97 ProvidersInfo providers_info; 102 ProvidersInfo providers_info;
98 }; 103 };
99 104
100 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_ 105 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/omnibox/omnibox_log.cc » ('j') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698