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

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

Issue 319523005: Omnibox: Combine Two Input Type Enums into One (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 6 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 | Annotate | Revision Log
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 "chrome/browser/autocomplete/autocomplete_input.h" 12 #include "chrome/browser/autocomplete/autocomplete_input.h"
13 #include "chrome/browser/autocomplete/autocomplete_provider.h" 13 #include "chrome/browser/autocomplete/autocomplete_provider.h"
14 #include "chrome/browser/sessions/session_id.h" 14 #include "chrome/browser/sessions/session_id.h"
15 #include "components/metrics/proto/omnibox_input_type.pb.h"
15 16
16 class AutocompleteResult; 17 class AutocompleteResult;
17 18
18 // 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
19 // the omnibox popup. 20 // the omnibox popup.
20 struct OmniboxLog { 21 struct OmniboxLog {
21 OmniboxLog( 22 OmniboxLog(
22 const base::string16& text, 23 const base::string16& text,
23 bool just_deleted_text, 24 bool just_deleted_text,
24 AutocompleteInput::Type input_type, 25 metrics::OmniboxInputType::Type input_type,
25 bool is_popup_open, 26 bool is_popup_open,
26 size_t selected_index, 27 size_t selected_index,
27 bool is_paste_and_go, 28 bool is_paste_and_go,
28 SessionID::id_type tab_id, 29 SessionID::id_type tab_id,
29 AutocompleteInput::PageClassification current_page_classification, 30 AutocompleteInput::PageClassification current_page_classification,
30 base::TimeDelta elapsed_time_since_user_first_modified_omnibox, 31 base::TimeDelta elapsed_time_since_user_first_modified_omnibox,
31 size_t completed_length, 32 size_t completed_length,
32 base::TimeDelta elapsed_time_since_last_change_to_default_match, 33 base::TimeDelta elapsed_time_since_last_change_to_default_match,
33 const AutocompleteResult& result); 34 const AutocompleteResult& result);
34 ~OmniboxLog(); 35 ~OmniboxLog();
35 36
36 // The user's input text in the omnibox. 37 // The user's input text in the omnibox.
37 base::string16 text; 38 base::string16 text;
38 39
39 // Whether the user deleted text immediately before selecting an omnibox 40 // Whether the user deleted text immediately before selecting an omnibox
40 // suggestion. This is usually the result of pressing backspace or delete. 41 // suggestion. This is usually the result of pressing backspace or delete.
41 bool just_deleted_text; 42 bool just_deleted_text;
42 43
43 // The detected type of the user's input. 44 // The detected type of the user's input.
44 AutocompleteInput::Type input_type; 45 metrics::OmniboxInputType::Type input_type;
45 46
46 // True if the popup is open. 47 // True if the popup is open.
47 bool is_popup_open; 48 bool is_popup_open;
48 49
49 // The index of the item selected in the dropdown list. Set to 0 if the 50 // The index of the item selected in the dropdown list. Set to 0 if the
50 // dropdown is closed (and therefore there is only one implicit suggestion). 51 // dropdown is closed (and therefore there is only one implicit suggestion).
51 size_t selected_index; 52 size_t selected_index;
52 53
53 // True if this is a paste-and-search or paste-and-go omnibox interaction. 54 // True if this is a paste-and-search or paste-and-go omnibox interaction.
54 // (The codebase refers to both these types as paste-and-go.) 55 // (The codebase refers to both these types as paste-and-go.)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Result set. 90 // Result set.
90 const AutocompleteResult& result; 91 const AutocompleteResult& result;
91 92
92 // Diagnostic information from providers. See 93 // Diagnostic information from providers. See
93 // AutocompleteController::AddProvidersInfo() and 94 // AutocompleteController::AddProvidersInfo() and
94 // AutocompleteProvider::AddProviderInfo() above. 95 // AutocompleteProvider::AddProviderInfo() above.
95 ProvidersInfo providers_info; 96 ProvidersInfo providers_info;
96 }; 97 };
97 98
98 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_ 99 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_LOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/omnibox_metrics_provider.cc ('k') | chrome/browser/omnibox/omnibox_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698