| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Returns iterator to first item in |shortcuts_map_| matching |keyword|. | 73 // Returns iterator to first item in |shortcuts_map_| matching |keyword|. |
| 74 // Returns shortcuts_map_.end() if there are no matches. | 74 // Returns shortcuts_map_.end() if there are no matches. |
| 75 history::ShortcutsBackend::ShortcutMap::const_iterator FindFirstMatch( | 75 history::ShortcutsBackend::ShortcutMap::const_iterator FindFirstMatch( |
| 76 const string16& keyword); | 76 const string16& keyword); |
| 77 | 77 |
| 78 static int CalculateScore( | 78 static int CalculateScore( |
| 79 const string16& terms, | 79 const string16& terms, |
| 80 const history::ShortcutsBackend::Shortcut& shortcut); | 80 const history::ShortcutsBackend::Shortcut& shortcut); |
| 81 | 81 |
| 82 // For unit-test only. | |
| 83 void set_shortcuts_backend(history::ShortcutsBackend* shortcuts_backend); | |
| 84 | |
| 85 std::string languages_; | 82 std::string languages_; |
| 86 bool initialized_; | 83 bool initialized_; |
| 87 | |
| 88 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; | |
| 89 }; | 84 }; |
| 90 | 85 |
| 91 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ | 86 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_PROVIDER_H_ |
| OLD | NEW |