OLD | NEW |
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_BOOKMARK_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BOOKMARK_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_BOOKMARK_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_BOOKMARK_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/omnibox/autocomplete_input.h" | 10 #include "components/omnibox/autocomplete_input.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // TODO(mrossetti): Propose a way to coordinate with the HQP the taking of typed | 28 // TODO(mrossetti): Propose a way to coordinate with the HQP the taking of typed |
29 // and visit counts and last visit dates, etc. into consideration while scoring. | 29 // and visit counts and last visit dates, etc. into consideration while scoring. |
30 class BookmarkProvider : public AutocompleteProvider { | 30 class BookmarkProvider : public AutocompleteProvider { |
31 public: | 31 public: |
32 explicit BookmarkProvider(Profile* profile); | 32 explicit BookmarkProvider(Profile* profile); |
33 | 33 |
34 // When |minimal_changes| is true short circuit any additional searching and | 34 // When |minimal_changes| is true short circuit any additional searching and |
35 // leave the previous matches for this provider unchanged, otherwise perform | 35 // leave the previous matches for this provider unchanged, otherwise perform |
36 // a complete search for |input| across all bookmark titles. | 36 // a complete search for |input| across all bookmark titles. |
37 virtual void Start(const AutocompleteInput& input, | 37 virtual void Start(const AutocompleteInput& input, |
38 bool minimal_changes) OVERRIDE; | 38 bool minimal_changes) override; |
39 | 39 |
40 // Sets the BookmarkModel for unit tests. | 40 // Sets the BookmarkModel for unit tests. |
41 void set_bookmark_model_for_testing(BookmarkModel* bookmark_model) { | 41 void set_bookmark_model_for_testing(BookmarkModel* bookmark_model) { |
42 bookmark_model_ = bookmark_model; | 42 bookmark_model_ = bookmark_model; |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 FRIEND_TEST_ALL_PREFIXES(BookmarkProviderTest, InlineAutocompletion); | 46 FRIEND_TEST_ALL_PREFIXES(BookmarkProviderTest, InlineAutocompletion); |
47 | 47 |
48 virtual ~BookmarkProvider(); | 48 virtual ~BookmarkProvider(); |
(...skipping 24 matching lines...) Expand all Loading... |
73 Profile* profile_; | 73 Profile* profile_; |
74 BookmarkModel* bookmark_model_; | 74 BookmarkModel* bookmark_model_; |
75 | 75 |
76 // Languages used during the URL formatting. | 76 // Languages used during the URL formatting. |
77 std::string languages_; | 77 std::string languages_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(BookmarkProvider); | 79 DISALLOW_COPY_AND_ASSIGN(BookmarkProvider); |
80 }; | 80 }; |
81 | 81 |
82 #endif // CHROME_BROWSER_AUTOCOMPLETE_BOOKMARK_PROVIDER_H_ | 82 #endif // CHROME_BROWSER_AUTOCOMPLETE_BOOKMARK_PROVIDER_H_ |
OLD | NEW |