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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_input.h

Issue 314773002: Omnibox: Send Input Type to Suggest Server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 #include "url/url_parse.h" 14 #include "url/url_parse.h"
15 15
16 // The user input for an autocomplete query. Allows copying. 16 // The user input for an autocomplete query. Allows copying.
17 class AutocompleteInput { 17 class AutocompleteInput {
18 public: 18 public:
19 // Note that the type below may be misleading. For example, "http:/" alone 19 // Note that the type below may be misleading. For example, "http:/" alone
20 // cannot be opened as a URL, so it is marked as a QUERY; yet the user 20 // cannot be opened as a URL, so it is marked as a QUERY; yet the user
21 // probably intends to type more and have it eventually become a URL, so we 21 // probably intends to type more and have it eventually become a URL, so we
22 // need to make sure we still run it through inline autocomplete. 22 // need to make sure we still run it through inline autocomplete.
23 // Warning: the value of this enum is sent to some suggest servers. Do not
24 // reorder or delete entries. Add new entries at the end.
23 enum Type { 25 enum Type {
24 INVALID, // Empty input 26 INVALID = 0, // Empty input
25 UNKNOWN, // Valid input whose type cannot be determined 27 UNKNOWN = 1, // Valid input whose type cannot be determined
26 URL, // Input autodetected as a URL 28 URL = 2, // Input autodetected as a URL
27 QUERY, // Input autodetected as a query 29 QUERY = 3, // Input autodetected as a query
28 FORCED_QUERY, // Input forced to be a query by an initial '?' 30 FORCED_QUERY = 4, // Input forced to be a query by an initial '?'
29 }; 31 };
Bart N. 2014/06/03 20:38:26 I came across this inconsistency on the server sid
Mark P 2014/06/03 20:53:33 Good point. The discrepancy is on the client side
30 32
31 // The type of page currently displayed. 33 // The type of page currently displayed.
32 // Note: when adding an element to this enum, please add it at the end 34 // Warning: when adding an element to this enum, please add it at the end
33 // and update omnibox_event.proto::PageClassification and 35 // and update omnibox_event.proto::PageClassification and
34 // omnibox_edit_model.cc::ClassifyPage() too. 36 // omnibox_edit_model.cc::ClassifyPage() too.
35 enum PageClassification { 37 enum PageClassification {
36 // An invalid URL; shouldn't happen. 38 // An invalid URL; shouldn't happen.
37 INVALID_SPEC = 0, 39 INVALID_SPEC = 0,
38 40
39 // chrome://newtab/. This can be either the built-in version or a 41 // chrome://newtab/. This can be either the built-in version or a
40 // replacement new tab page from an extension. Note that when Instant 42 // replacement new tab page from an extension. Note that when Instant
41 // Extended is enabled, the new tab page will be reported as either 43 // Extended is enabled, the new tab page will be reported as either
42 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or 44 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 url::Parsed parts_; 242 url::Parsed parts_;
241 base::string16 scheme_; 243 base::string16 scheme_;
242 GURL canonicalized_url_; 244 GURL canonicalized_url_;
243 bool prevent_inline_autocomplete_; 245 bool prevent_inline_autocomplete_;
244 bool prefer_keyword_; 246 bool prefer_keyword_;
245 bool allow_exact_keyword_match_; 247 bool allow_exact_keyword_match_;
246 bool want_asynchronous_matches_; 248 bool want_asynchronous_matches_;
247 }; 249 };
248 250
249 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ 251 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | chrome/browser/search_engines/template_url.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698