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

Side by Side 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: 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 friend class StartupBrowserCreatorImpl; 129 friend class StartupBrowserCreatorImpl;
130 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, 130 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,
131 ReadingWasRestartedAfterNormalStart); 131 ReadingWasRestartedAfterNormalStart);
132 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, 132 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest,
133 ReadingWasRestartedAfterRestart); 133 ReadingWasRestartedAfterRestart);
134 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles); 134 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles);
135 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, LastUsedProfileActivated); 135 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, LastUsedProfileActivated);
136 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorWinTest, 136 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorWinTest,
137 GetURLsFromCommandLineWithDesktopSearchURL); 137 GetURLsFromCommandLineWithDesktopSearchURL);
138 138
139 // Returns the list of URLs to open from the command line. The returned 139 // Returns the list of URLs to open from the command line. The returned vector
140 // vector is empty if the user didn't specify any URLs on the command line. 140 // is empty if the user didn't specify any URLs on the command line.
141 // |should_show_desktop_search_infobar| is set to true if an infobar should
142 // be shown to inform the user that a desktop search has been redirected to
143 // the default search engine.
141 static std::vector<GURL> GetURLsFromCommandLine( 144 static std::vector<GURL> GetURLsFromCommandLine(
142 const base::CommandLine& command_line, 145 const base::CommandLine& command_line,
143 const base::FilePath& cur_dir, 146 const base::FilePath& cur_dir,
144 Profile* profile); 147 Profile* profile,
148 bool* should_show_desktop_search_infobar);
Peter Kasting 2016/01/20 03:03:01 Nit: I might name this |show_search_redirection_in
fdoray 2016/01/21 21:02:33 Done.
145 149
146 static bool ProcessCmdLineImpl(const base::CommandLine& command_line, 150 static bool ProcessCmdLineImpl(const base::CommandLine& command_line,
147 const base::FilePath& cur_dir, 151 const base::FilePath& cur_dir,
148 bool process_startup, 152 bool process_startup,
149 Profile* last_used_profile, 153 Profile* last_used_profile,
150 const Profiles& last_opened_profiles, 154 const Profiles& last_opened_profiles,
151 StartupBrowserCreator* browser_creator); 155 StartupBrowserCreator* browser_creator);
152 156
153 // This function performs command-line handling and is invoked only after 157 // This function performs command-line handling and is invoked only after
154 // start up (for example when we get a start request for another process). 158 // start up (for example when we get a start request for another process).
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Returns true if |profile| has exited uncleanly and has not been launched 200 // Returns true if |profile| has exited uncleanly and has not been launched
197 // after the unclean exit. 201 // after the unclean exit.
198 bool HasPendingUncleanExit(Profile* profile); 202 bool HasPendingUncleanExit(Profile* profile);
199 203
200 // Returns the path that contains the profile that should be loaded on process 204 // Returns the path that contains the profile that should be loaded on process
201 // startup. 205 // startup.
202 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, 206 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
203 const base::CommandLine& command_line); 207 const base::CommandLine& command_line);
204 208
205 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ 209 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698