| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 Profile* profile); | 124 Profile* profile); |
| 125 | 125 |
| 126 static bool ProcessCmdLineImpl(const base::CommandLine& command_line, | 126 static bool ProcessCmdLineImpl(const base::CommandLine& command_line, |
| 127 const base::FilePath& cur_dir, | 127 const base::FilePath& cur_dir, |
| 128 bool process_startup, | 128 bool process_startup, |
| 129 Profile* last_used_profile, | 129 Profile* last_used_profile, |
| 130 const Profiles& last_opened_profiles, | 130 const Profiles& last_opened_profiles, |
| 131 int* return_code, | 131 int* return_code, |
| 132 StartupBrowserCreator* browser_creator); | 132 StartupBrowserCreator* browser_creator); |
| 133 | 133 |
| 134 // This function performs command-line handling and is invoked only after |
| 135 // start up (for example when we get a start request for another process). |
| 136 // |command_line| holds the command line being processed. |
| 137 // |cur_dir| is the current working directory that the original process was |
| 138 // invoked from. |
| 139 // |profile| is the profile the apps will be launched in. |
| 140 static bool ProcessLoadApps(const base::CommandLine& command_line, |
| 141 const base::FilePath& cur_dir, |
| 142 Profile* profile); |
| 143 |
| 134 // Callback after a profile has been created. | 144 // Callback after a profile has been created. |
| 135 static void ProcessCommandLineOnProfileCreated( | 145 static void ProcessCommandLineOnProfileCreated( |
| 136 const base::CommandLine& command_line, | 146 const base::CommandLine& command_line, |
| 137 const base::FilePath& cur_dir, | 147 const base::FilePath& cur_dir, |
| 138 Profile* profile, | 148 Profile* profile, |
| 139 Profile::CreateStatus status); | 149 Profile::CreateStatus status); |
| 140 | 150 |
| 141 // Returns true once a profile was activated. Used by the | 151 // Returns true once a profile was activated. Used by the |
| 142 // StartupBrowserCreatorTest.LastUsedProfileActivated test. | 152 // StartupBrowserCreatorTest.LastUsedProfileActivated test. |
| 143 static bool ActivatedProfile(); | 153 static bool ActivatedProfile(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 167 // Returns true if |profile| has exited uncleanly and has not been launched | 177 // Returns true if |profile| has exited uncleanly and has not been launched |
| 168 // after the unclean exit. | 178 // after the unclean exit. |
| 169 bool HasPendingUncleanExit(Profile* profile); | 179 bool HasPendingUncleanExit(Profile* profile); |
| 170 | 180 |
| 171 // Returns the path that contains the profile that should be loaded on process | 181 // Returns the path that contains the profile that should be loaded on process |
| 172 // startup. | 182 // startup. |
| 173 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, | 183 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, |
| 174 const base::CommandLine& command_line); | 184 const base::CommandLine& command_line); |
| 175 | 185 |
| 176 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 186 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
| OLD | NEW |