| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_WIN_H_ | |
| 6 #define COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_WIN_H_ | |
| 7 | |
| 8 #include "base/feature_list.h" | |
| 9 #include "base/strings/string16.h" | |
| 10 | |
| 11 class GURL; | |
| 12 class PrefService; | |
| 13 class SearchTermsData; | |
| 14 | |
| 15 namespace user_prefs { | |
| 16 class PrefRegistrySyncable; | |
| 17 } | |
| 18 | |
| 19 namespace prefs { | |
| 20 // Name of the Windows desktop search redirection preference. | |
| 21 extern const char kWindowsDesktopSearchRedirectionPref[]; | |
| 22 } | |
| 23 | |
| 24 // Windows desktop search redirection feature. This is exposed in the header | |
| 25 // file so that it can be referenced from about_flags.cc. | |
| 26 extern const base::Feature kWindowsDesktopSearchRedirectionFeature; | |
| 27 | |
| 28 // Registers the Windows desktop search redirection preference into |registry|. | |
| 29 void RegisterWindowsDesktopSearchRedirectionPref( | |
| 30 user_prefs::PrefRegistrySyncable* registry); | |
| 31 | |
| 32 // Indicates whether Windows desktop searches should be redirected to the | |
| 33 // default search engine. This is only true when both the preference and the | |
| 34 // feature are enabled. The preference value is read from |pref_service|. | |
| 35 bool ShouldRedirectWindowsDesktopSearchToDefaultSearchEngine( | |
| 36 PrefService* pref_service); | |
| 37 | |
| 38 // Detects whether a URL comes from a Windows Desktop search. If so, puts the | |
| 39 // search terms in |search_terms| and returns true. | |
| 40 bool DetectWindowsDesktopSearch(const GURL& url, | |
| 41 const SearchTermsData& search_terms_data, | |
| 42 base::string16* search_terms); | |
| 43 | |
| 44 #endif // COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_WIN_H_ | |
| OLD | NEW |