OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_UTILS_WIN_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_ |
| 7 |
| 8 #include "base/feature_list.h" |
| 9 #include "base/strings/string16.h" |
| 10 #include "url/gurl.h" |
| 11 |
| 12 class PrefService; |
| 13 class TemplateURLService; |
| 14 |
| 15 namespace user_prefs { |
| 16 class PrefRegistrySyncable; |
| 17 } |
| 18 |
| 19 // Windows desktop search redirection feature. This is exposed in the header |
| 20 // file so that it can be referenced from about_flags.cc. |
| 21 extern const base::Feature kWindowsDesktopSearchRedirectionFeature; |
| 22 |
| 23 // Registers the Windows desktop search redirection preference into |registry|. |
| 24 void RegisterWindowsDesktopSearchRedirectionPref( |
| 25 user_prefs::PrefRegistrySyncable* registry); |
| 26 |
| 27 // Replaces |url| by a default search engine URL if it is a desktop search URL |
| 28 // and these conditions are met: |
| 29 // - The Windows desktop search redirection feature is enabled. |
| 30 // - The default search engine is not Bing. |
| 31 // |should_show_infobar| is set to true if an infobar should be shown to tell |
| 32 // the user that a redirection occurred. |
| 33 void ReplaceWindowsDesktopSearchURLWithDefaultSearchURLIfNeeded( |
| 34 PrefService* pref_service, |
| 35 TemplateURLService* template_url_service, |
| 36 GURL* url, |
| 37 bool* should_show_infobar); |
| 38 |
| 39 #endif // COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_ |
OLD | NEW |