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

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

Issue 10909130: autocomplete: Add AutocompleteProvider::Type enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add !! for windows Created 8 years, 3 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_CLASSIFIER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/browser/profiles/profile_keyed_service.h" 12 #include "chrome/browser/profiles/profile_keyed_service.h"
13 13
14 class AutocompleteController; 14 class AutocompleteController;
15 struct AutocompleteMatch; 15 struct AutocompleteMatch;
16 class GURL; 16 class GURL;
17 class Profile; 17 class Profile;
18 18
19 class AutocompleteClassifier : public ProfileKeyedService { 19 class AutocompleteClassifier : public ProfileKeyedService {
20 public: 20 public:
21 // Bitmap of AutocompleteProvider::Type values describing the default set of
22 // providers queried for the omnibox. Intended to be passed to
23 // AutocompleteController().
24 static const int kDefaultOmniboxProviders;
25
21 explicit AutocompleteClassifier(Profile* profile); 26 explicit AutocompleteClassifier(Profile* profile);
22 virtual ~AutocompleteClassifier(); 27 virtual ~AutocompleteClassifier();
23 28
24 // Given some string |text| that the user wants to use for navigation, 29 // Given some string |text| that the user wants to use for navigation,
25 // determines how it should be interpreted. |desired_tld| is the user's 30 // determines how it should be interpreted. |desired_tld| is the user's
26 // desired TLD, if any; see AutocompleteInput::desired_tld(). 31 // desired TLD, if any; see AutocompleteInput::desired_tld().
27 // |prefer_keyword| should be true the when keyword UI is onscreen; see 32 // |prefer_keyword| should be true the when keyword UI is onscreen; see
28 // comments on AutocompleteController::Start(). 33 // comments on AutocompleteController::Start().
29 // |allow_exact_keyword_match| should be true when treating the string as a 34 // |allow_exact_keyword_match| should be true when treating the string as a
30 // potential keyword search is valid; see 35 // potential keyword search is valid; see
(...skipping 18 matching lines...) Expand all
49 scoped_ptr<AutocompleteController> controller_; 54 scoped_ptr<AutocompleteController> controller_;
50 55
51 // Are we currently in Classify? Used to verify Classify isn't invoked 56 // Are we currently in Classify? Used to verify Classify isn't invoked
52 // recursively, since this can corrupt state and cause crashes. 57 // recursively, since this can corrupt state and cause crashes.
53 bool inside_classify_; 58 bool inside_classify_;
54 59
55 DISALLOW_IMPLICIT_CONSTRUCTORS(AutocompleteClassifier); 60 DISALLOW_IMPLICIT_CONSTRUCTORS(AutocompleteClassifier);
56 }; 61 };
57 62
58 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_H_ 63 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/autocomplete/autocomplete_classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698