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

Unified Diff: chrome/browser/autocomplete/autocomplete_input.h

Issue 320713002: Revert of Omnibox: Combine Two Input Type Enums into One (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_input.h
diff --git a/chrome/browser/autocomplete/autocomplete_input.h b/chrome/browser/autocomplete/autocomplete_input.h
index 46dbdd4ebd5dc95bfd439b7fadc16205e3332e8e..b923e7b6542163ba51d00ce44c995eec3c0da602 100644
--- a/chrome/browser/autocomplete/autocomplete_input.h
+++ b/chrome/browser/autocomplete/autocomplete_input.h
@@ -10,14 +10,23 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/strings/string16.h"
-#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "url/gurl.h"
#include "url/url_parse.h"
// The user input for an autocomplete query. Allows copying.
class AutocompleteInput {
public:
- typedef metrics::OmniboxInputType::Type Type;
+ // Note that the type below may be misleading. For example, "http:/" alone
+ // cannot be opened as a URL, so it is marked as a QUERY; yet the user
+ // probably intends to type more and have it eventually become a URL, so we
+ // need to make sure we still run it through inline autocomplete.
+ enum Type {
+ INVALID, // Empty input
+ UNKNOWN, // Valid input whose type cannot be determined
+ URL, // Input autodetected as a URL
+ QUERY, // Input autodetected as a query
+ FORCED_QUERY, // Input forced to be a query by an initial '?'
+ };
// The type of page currently displayed.
// Note: when adding an element to this enum, please add it at the end
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698