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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.h

Issue 1598553003: Implement the Windows desktop search redirection feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build errors due to prefs being moved in components 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/startup_browser_creator.h
diff --git a/chrome/browser/ui/startup/startup_browser_creator.h b/chrome/browser/ui/startup/startup_browser_creator.h
index 7f0f4e3c4b7346c9e9d9be68f557b35793447552..b426ae4372be954f0ab291716c1030606ffdf91e 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -99,6 +99,10 @@ class StartupBrowserCreator {
return show_main_browser_window_;
}
+ bool show_desktop_search_redirection_infobar() const {
+ return show_desktop_search_redirection_infobar_;
+ }
+
// For faking that no profiles have been launched yet.
static void ClearLaunchedProfilesForTesting();
@@ -133,8 +137,6 @@ class StartupBrowserCreator {
ReadingWasRestartedAfterRestart);
FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles);
FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, LastUsedProfileActivated);
- FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorWinTest,
- GetURLsFromCommandLineWithDesktopSearchURL);
bool ProcessCmdLineImpl(const base::CommandLine& command_line,
const base::FilePath& cur_dir,
@@ -142,12 +144,16 @@ class StartupBrowserCreator {
Profile* last_used_profile,
const Profiles& last_opened_profiles);
- // Returns the list of URLs to open from the command line. The returned
- // vector is empty if the user didn't specify any URLs on the command line.
+ // Returns the list of URLs to open from the command line. The returned vector
+ // is empty if the user didn't specify any URLs on the command line.
+ // |show_search_redirection_infobar| is set to true if an infobar should be
+ // shown to inform the user that a desktop search has been redirected to the
+ // default search engine.
static std::vector<GURL> GetURLsFromCommandLine(
const base::CommandLine& command_line,
const base::FilePath& cur_dir,
- Profile* profile);
+ Profile* profile,
+ bool* show_desktop_search_redirection_infobar);
// This function performs command-line handling and is invoked only after
// start up (for example when we get a start request for another process).
@@ -182,6 +188,10 @@ class StartupBrowserCreator {
// created. Default is true.
bool show_main_browser_window_;
+ // Whether an infobar should be shown to inform the user that a desktop search
+ // has been redirected to the default search engine.
+ bool show_desktop_search_redirection_infobar_;
+
// True if we have already read and reset the preference kWasRestarted. (A
// member variable instead of a static variable inside WasRestarted because
// of testing.)
« no previous file with comments | « chrome/browser/search_engines/template_url_service_factory.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698