| 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 // This file contains the Search autocomplete provider. This provider is | 5 // This file contains the Search autocomplete provider. This provider is |
| 6 // responsible for all autocomplete entries that start with "Search <engine> | 6 // responsible for all autocomplete entries that start with "Search <engine> |
| 7 // for ...", including searching for the current input string, search | 7 // for ...", including searching for the current input string, search |
| 8 // history, and search suggestions. An instance of it gets created and | 8 // history, and search suggestions. An instance of it gets created and |
| 9 // managed by the autocomplete controller. | 9 // managed by the autocomplete controller. |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Update the omnibox start margin used to generate search suggestion URLs. | 97 // Update the omnibox start margin used to generate search suggestion URLs. |
| 98 void SetOmniboxStartMargin(int omnibox_start_margin); | 98 void SetOmniboxStartMargin(int omnibox_start_margin); |
| 99 | 99 |
| 100 bool field_trial_triggered_in_session() const { | 100 bool field_trial_triggered_in_session() const { |
| 101 return field_trial_triggered_in_session_; | 101 return field_trial_triggered_in_session_; |
| 102 } | 102 } |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 // TODO(hfung): Remove ZeroSuggestProvider as a friend class after | 105 // TODO(hfung): Remove ZeroSuggestProvider as a friend class after |
| 106 // refactoring common code to a new base class. | 106 // refactoring common code to a new base class. |
| 107 friend class SearchProviderTest; |
| 107 friend class ZeroSuggestProvider; | 108 friend class ZeroSuggestProvider; |
| 108 friend class SearchProviderTest; | |
| 109 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInline); | 109 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInline); |
| 110 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineDomainClassify); | 110 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineDomainClassify); |
| 111 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineSchemeSubstring); | 111 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, NavigationInlineSchemeSubstring); |
| 112 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, RemoveStaleResultsTest); | 112 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, RemoveStaleResultsTest); |
| 113 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, SuggestRelevanceExperiment); | 113 FRIEND_TEST_ALL_PREFIXES(SearchProviderTest, SuggestRelevanceExperiment); |
| 114 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, GetDestinationURL); | 114 FRIEND_TEST_ALL_PREFIXES(AutocompleteProviderTest, GetDestinationURL); |
| 115 | 115 |
| 116 // Manages the providers (TemplateURLs) used by SearchProvider. Two providers | 116 // Manages the providers (TemplateURLs) used by SearchProvider. Two providers |
| 117 // may be used: | 117 // may be used: |
| 118 // . The default provider. This corresponds to the user's default search | 118 // . The default provider. This corresponds to the user's default search |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 // session. | 524 // session. |
| 525 bool field_trial_triggered_in_session_; | 525 bool field_trial_triggered_in_session_; |
| 526 | 526 |
| 527 // Start margin of the omnibox. Used to construct search URLs. | 527 // Start margin of the omnibox. Used to construct search URLs. |
| 528 int omnibox_start_margin_; | 528 int omnibox_start_margin_; |
| 529 | 529 |
| 530 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 530 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 531 }; | 531 }; |
| 532 | 532 |
| 533 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ | 533 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ |
| OLD | NEW |