Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: components/search_engines/desktop_search_utils_win.h

Issue 1598553003: Implement the Windows desktop search redirection feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't assume that a Browser exists + fix nits Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 namespace prefs {
20 // Name of the preference keeping track of whether the Windows desktop search
21 // redirection infobar has already been shown.
22 extern const char kWindowsDesktopSearchRedirectionInfobarShownPref[];
23 } // namespace prefs
24
25 // Windows desktop search redirection feature. This is exposed in the header
26 // file so that it can be referenced from about_flags.cc.
27 extern const base::Feature kWindowsDesktopSearchRedirectionFeature;
28
29 // Registers the Windows desktop search redirection preference into |registry|.
30 void RegisterWindowsDesktopSearchRedirectionPref(
31 user_prefs::PrefRegistrySyncable* registry);
32
33 // Replaces |url| by a default search engine URL if it is a desktop search URL
34 // and these conditions are met:
35 // - The Windows desktop search redirection feature is enabled.
36 // - The default search engine is not Bing.
37 // |should_show_infobar| is set to true if an infobar should be shown to tell
38 // the user that a redirection occurred.
39 void ReplaceWindowsDesktopSearchURLWithDefaultSearchURLIfNeeded(
40 const PrefService* pref_service,
41 TemplateURLService* template_url_service,
42 GURL* url,
43 bool* should_show_infobar);
Peter Kasting 2016/01/20 03:03:02 Why doesn't this return a bool instead of taking i
fdoray 2016/01/21 21:02:34 Done.
44
45 #endif // COMPONENTS_SEARCH_ENGINES_DESKTOP_SEARCH_UTILS_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698