OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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_ |
OLD | NEW |