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

Side by Side 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, 1 month 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
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/search_versus_navigate_classifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
6 #define CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
7
8 #include <string>
9
10 #include "base/scoped_ptr.h"
11 #include "chrome/common/page_transition_types.h"
12
13 class AutocompleteController;
14 class GURL;
15 class Profile;
16
17 class SearchVersusNavigateClassifier {
18 public:
19 explicit SearchVersusNavigateClassifier(Profile* profile);
20 virtual ~SearchVersusNavigateClassifier();
21
22 // Given some string |text| that the user wants to use for navigation,
23 // determines whether to treat it as a search query or a URL, and returns the
24 // details of the resulting navigation.
25 // NOTE: After |desired_tld|, all parameters are potentially-NULL outparams.
26 // |desired_tld| - User's desired TLD.
27 // See AutocompleteInput::desired_tld().
28 // |is_search| - Set to true if this is to be treated as a
29 // query rather than URL.
30 // |destination_url| - The URL to load. It may be empty if there is no
31 // possible navigation (when |text| is empty).
32 // |transition| - The transition type.
33 // |is_history_what_you_typed_match|
34 // - Set to true when the default match is the
35 // "what you typed" match from the history.
36 // |alternate_nav_url| - The navigational URL in case of an accidental
37 // search; see comments on
38 // AutocompleteResult::alternate_nav_url_ in
39 // autocomplete.h.
40 void Classify(const std::wstring& text,
41 const std::wstring& desired_tld,
42 bool* is_search,
43 GURL* destination_url,
44 PageTransition::Type* transition,
45 bool* is_history_what_you_typed_match,
46 GURL* alternate_nav_url);
47
48 private:
49 scoped_ptr<AutocompleteController> controller_;
50 };
51
52 #endif // CHROME_BROWSER_SEARCH_VERSUS_NAVIGATE_CLASSIFIER_H_
OLDNEW
« 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