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

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

Issue 836213002: Assume all providers may give zero suggest responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation issue in athena Created 5 years, 11 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
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_SHORTCUTS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 // suggestion for a given search term the higher will be that suggestion's 21 // suggestion for a given search term the higher will be that suggestion's
22 // ranking for future uses of that search term. 22 // ranking for future uses of that search term.
23 class ShortcutsProvider 23 class ShortcutsProvider
24 : public AutocompleteProvider, 24 : public AutocompleteProvider,
25 public ShortcutsBackend::ShortcutsBackendObserver { 25 public ShortcutsBackend::ShortcutsBackendObserver {
26 public: 26 public:
27 explicit ShortcutsProvider(Profile* profile); 27 explicit ShortcutsProvider(Profile* profile);
28 28
29 // Performs the autocompletion synchronously. Since no asynch completion is 29 // Performs the autocompletion synchronously. Since no asynch completion is
30 // performed |minimal_changes| is ignored. 30 // performed |minimal_changes| is ignored.
31 void Start(const AutocompleteInput& input, bool minimal_changes) override; 31 void Start(const AutocompleteInput& input,
32 bool minimal_changes,
33 bool called_due_to_focus) override;
32 34
33 void DeleteMatch(const AutocompleteMatch& match) override; 35 void DeleteMatch(const AutocompleteMatch& match) override;
34 36
35 private: 37 private:
36 friend class ClassifyTest; 38 friend class ClassifyTest;
37 friend class ShortcutsProviderTest; 39 friend class ShortcutsProviderTest;
38 FRIEND_TEST_ALL_PREFIXES(ShortcutsProviderTest, CalculateScore); 40 FRIEND_TEST_ALL_PREFIXES(ShortcutsProviderTest, CalculateScore);
39 41
40 typedef std::multimap<base::char16, base::string16> WordMap; 42 typedef std::multimap<base::char16, base::string16> WordMap;
41 43
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 104
103 // The default max relevance unless overridden by a field trial. 105 // The default max relevance unless overridden by a field trial.
104 static const int kShortcutsProviderDefaultMaxRelevance; 106 static const int kShortcutsProviderDefaultMaxRelevance;
105 107
106 Profile* profile_; 108 Profile* profile_;
107 std::string languages_; 109 std::string languages_;
108 bool initialized_; 110 bool initialized_;
109 }; 111 };
110 112
111 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ 113 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698