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

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

Issue 165163002: Handle Search suggest subtypes for Shortcuts DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests Created 6 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This class contains common functionality for search-based autocomplete 5 // This class contains common functionality for search-based autocomplete
6 // providers. Search provider and zero suggest provider both use it for common 6 // providers. Search provider and zero suggest provider both use it for common
7 // functionality. 7 // functionality.
8 8
9 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 9 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
10 #define CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 10 #define CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // AutocompleteProvider: 57 // AutocompleteProvider:
58 virtual void Stop(bool clear_cached_results) OVERRIDE; 58 virtual void Stop(bool clear_cached_results) OVERRIDE;
59 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE; 59 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE;
60 virtual void AddProviderInfo(ProvidersInfo* provider_info) const OVERRIDE; 60 virtual void AddProviderInfo(ProvidersInfo* provider_info) const OVERRIDE;
61 61
62 bool field_trial_triggered_in_session() const { 62 bool field_trial_triggered_in_session() const {
63 return field_trial_triggered_in_session_; 63 return field_trial_triggered_in_session_;
64 } 64 }
65 65
66 protected: 66 protected:
67 friend class ShortcutsBackend;
68
67 // The following keys are used to record additional information on matches. 69 // The following keys are used to record additional information on matches.
68 70
69 // We annotate our AutocompleteMatches with whether their relevance scores 71 // We annotate our AutocompleteMatches with whether their relevance scores
70 // were server-provided using this key in the |additional_info| field. 72 // were server-provided using this key in the |additional_info| field.
71 static const char kRelevanceFromServerKey[]; 73 static const char kRelevanceFromServerKey[];
72 74
73 // Indicates whether the server said a match should be prefetched. 75 // Indicates whether the server said a match should be prefetched.
74 static const char kShouldPrefetchKey[]; 76 static const char kShouldPrefetchKey[];
75 77
76 // Used to store metadata from the server response, which is needed for 78 // Used to store metadata from the server response, which is needed for
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 468
467 // Each deletion handler in this vector corresponds to an outstanding request 469 // Each deletion handler in this vector corresponds to an outstanding request
468 // that a server delete a personalized suggestion. Making this a ScopedVector 470 // that a server delete a personalized suggestion. Making this a ScopedVector
469 // causes us to auto-cancel all such requests on shutdown. 471 // causes us to auto-cancel all such requests on shutdown.
470 SuggestionDeletionHandlers deletion_handlers_; 472 SuggestionDeletionHandlers deletion_handlers_;
471 473
472 DISALLOW_COPY_AND_ASSIGN(BaseSearchProvider); 474 DISALLOW_COPY_AND_ASSIGN(BaseSearchProvider);
473 }; 475 };
474 476
475 #endif // CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 477 #endif // CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698