| Index: components/search_engines/desktop_search_utils_win.h
|
| diff --git a/components/search_engines/desktop_search_utils_win.h b/components/search_engines/desktop_search_utils_win.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2d0b2bc89684f98e5dc078f15fae28a6c9a7d915
|
| --- /dev/null
|
| +++ b/components/search_engines/desktop_search_utils_win.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_
|
| +#define COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_
|
| +
|
| +#include "base/feature_list.h"
|
| +#include "base/strings/string16.h"
|
| +#include "url/gurl.h"
|
| +
|
| +class PrefService;
|
| +class TemplateURLService;
|
| +
|
| +namespace user_prefs {
|
| +class PrefRegistrySyncable;
|
| +}
|
| +
|
| +// Windows desktop search redirection feature. This is exposed in the header
|
| +// file so that it can be referenced from about_flags.cc.
|
| +extern const base::Feature kWindowsDesktopSearchRedirectionFeature;
|
| +
|
| +// Registers the Windows desktop search redirection preference into |registry|.
|
| +void RegisterWindowsDesktopSearchRedirectionPref(
|
| + user_prefs::PrefRegistrySyncable* registry);
|
| +
|
| +// Replaces |url| by a default search engine URL if it is a desktop search URL
|
| +// and these conditions are met:
|
| +// - The Windows desktop search redirection feature is enabled.
|
| +// - The default search engine is not Bing.
|
| +// |should_show_infobar| is set to true if an infobar should be shown to tell
|
| +// the user that a redirection occurred.
|
| +void ReplaceWindowsDesktopSearchURLWithDefaultSearchURLIfNeeded(
|
| + PrefService* pref_service,
|
| + TemplateURLService* template_url_service,
|
| + GURL* url,
|
| + bool* should_show_infobar);
|
| +
|
| +#endif // COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_
|
|
|