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

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

Issue 872433003: Remove omnibox watcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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,
30 SessionID::id_type tab_id, 29 SessionID::id_type tab_id,
31 metrics::OmniboxEventProto::PageClassification 30 metrics::OmniboxEventProto::PageClassification
32 current_page_classification, 31 current_page_classification,
33 base::TimeDelta elapsed_time_since_user_first_modified_omnibox, 32 base::TimeDelta elapsed_time_since_user_first_modified_omnibox,
34 size_t completed_length, 33 size_t completed_length,
35 base::TimeDelta elapsed_time_since_last_change_to_default_match, 34 base::TimeDelta elapsed_time_since_last_change_to_default_match,
36 const AutocompleteResult& result); 35 const AutocompleteResult& result);
37 ~OmniboxLog(); 36 ~OmniboxLog();
38 37
39 // The user's input text in the omnibox. 38 // The user's input text in the omnibox.
(...skipping 10 matching lines...) Expand all
50 bool is_popup_open; 49 bool is_popup_open;
51 50
52 // The index of the item selected in the dropdown list. Set to 0 if the 51 // The index of the item selected in the dropdown list. Set to 0 if the
53 // dropdown is closed (and therefore there is only one implicit suggestion). 52 // dropdown is closed (and therefore there is only one implicit suggestion).
54 size_t selected_index; 53 size_t selected_index;
55 54
56 // True if this is a paste-and-search or paste-and-go omnibox interaction. 55 // True if this is a paste-and-search or paste-and-go omnibox interaction.
57 // (The codebase refers to both these types as paste-and-go.) 56 // (The codebase refers to both these types as paste-and-go.)
58 bool is_paste_and_go; 57 bool is_paste_and_go;
59 58
60 // True if the user's last action was a paste or if (somehow) the user is
61 // still in the act of pasting.
62 bool last_action_was_paste;
63
64 // ID of the tab the selected autocomplete suggestion was opened in. 59 // ID of the tab the selected autocomplete suggestion was opened in.
65 // Set to -1 if we haven't yet determined the destination tab. 60 // Set to -1 if we haven't yet determined the destination tab.
66 SessionID::id_type tab_id; 61 SessionID::id_type tab_id;
67 62
68 // The type of page (e.g., new tab page, regular web page) that the 63 // The type of page (e.g., new tab page, regular web page) that the
69 // user was viewing before going somewhere with the omnibox. 64 // user was viewing before going somewhere with the omnibox.
70 metrics::OmniboxEventProto::PageClassification current_page_classification; 65 metrics::OmniboxEventProto::PageClassification current_page_classification;
71 66
72 // The amount of time since the user first began modifying the text 67 // The amount of time since the user first began modifying the text
73 // in the omnibox. If at some point after modifying the text, the 68 // in the omnibox. If at some point after modifying the text, the
(...skipping 22 matching lines...) Expand all
96 // Result set. 91 // Result set.
97 const AutocompleteResult& result; 92 const AutocompleteResult& result;
98 93
99 // Diagnostic information from providers. See 94 // Diagnostic information from providers. See
100 // AutocompleteController::AddProvidersInfo() and 95 // AutocompleteController::AddProvidersInfo() and
101 // AutocompleteProvider::AddProviderInfo() above. 96 // AutocompleteProvider::AddProviderInfo() above.
102 ProvidersInfo providers_info; 97 ProvidersInfo providers_info;
103 }; 98 };
104 99
105 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_ 100 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698