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

Unified Diff: chrome/browser/search_versus_navigate_classifier.h

Issue 328031: Refactor paste and go out of AutocompleteEdit. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: style fixes Created 11 years, 2 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 | « chrome/browser/profile.cc ('k') | chrome/browser/search_versus_navigate_classifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_versus_navigate_classifier.h
===================================================================
--- chrome/browser/search_versus_navigate_classifier.h (revision 0)
+++ chrome/browser/search_versus_navigate_classifier.h (revision 0)
@@ -0,0 +1,52 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
+#define CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
+
+#include <string>
+
+#include "base/scoped_ptr.h"
+#include "chrome/common/page_transition_types.h"
+
+class AutocompleteController;
+class GURL;
+class Profile;
+
+class SearchVersusNavigateClassifier {
+ public:
+ explicit SearchVersusNavigateClassifier(Profile* profile);
+ virtual ~SearchVersusNavigateClassifier();
+
+ // Given some string |text| that the user wants to use for navigation,
+ // determines whether to treat it as a search query or a URL, and returns the
+ // details of the resulting navigation.
+ // NOTE: After |desired_tld|, all parameters are potentially-NULL outparams.
+ // |desired_tld| - User's desired TLD.
+ // See AutocompleteInput::desired_tld().
+ // |is_search| - Set to true if this is to be treated as a
+ // query rather than URL.
+ // |destination_url| - The URL to load. It may be empty if there is no
+ // possible navigation (when |text| is empty).
+ // |transition| - The transition type.
+ // |is_history_what_you_typed_match|
+ // - Set to true when the default match is the
+ // "what you typed" match from the history.
+ // |alternate_nav_url| - The navigational URL in case of an accidental
+ // search; see comments on
+ // AutocompleteResult::alternate_nav_url_ in
+ // autocomplete.h.
+ void Classify(const std::wstring& text,
+ const std::wstring& desired_tld,
+ bool* is_search,
+ GURL* destination_url,
+ PageTransition::Type* transition,
+ bool* is_history_what_you_typed_match,
+ GURL* alternate_nav_url);
+
+ private:
+ scoped_ptr<AutocompleteController> controller_;
+};
+
+#endif // CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/search_versus_navigate_classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698