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

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

Issue 2047483003: Add fallback behavior if the last used profile cannot initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Patch Set: Handle the case where the selected profile is not in ProfileAttributesStorage Created 4 years, 6 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 f2e3c0a5fd757609b5df07e3960161ba5350888d..53968b90d366be23ea4f7a3047ea0d27ce815071 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -179,4 +179,20 @@ bool HasPendingUncleanExit(Profile* profile);
base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
const base::CommandLine& command_line);
+#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+// Returns the profile that should be loaded on process startup. This is either
+// the profile return by GetStartupProfilePath, or the guest profile if the
Peter Kasting 2016/07/01 00:53:23 Nit: returned
WC Leung 2016/07/07 17:01:54 Done.
+// above profile is locked. The guest profile denotes that we should open the
+// user manager. Returns null if the above profile cannot be opened. In case of
Peter Kasting 2016/07/01 00:53:23 Why does returning the guest profile denote openin
WC Leung 2016/07/07 17:01:54 I suggest a structure with an enum and a Profile*.
Peter Kasting 2016/07/11 02:58:59 Hmm. Sounds like this does need cleanup, and you'
+// user manager, returns null if either the guest profile and the system profile
Peter Kasting 2016/07/01 00:53:24 Nit: Do you mean "neither/nor...can be opened"? H
WC Leung 2016/07/07 17:01:54 I do really mean "either". If the guest profile c
Peter Kasting 2016/07/11 02:58:59 Then I think you meant to use "either...or" instea
WC Leung 2016/07/18 17:56:18 Done. Sorry for this stupid mistake.
+// cannot be opened.
+Profile* GetStartupProfile(const base::FilePath& user_data_dir,
+ const base::CommandLine& command_line);
+
+// Returns the a fallback profile that should be loaded on process startup.
Peter Kasting 2016/07/01 00:53:24 Nit: extra a Explain what a fallback profile is.
WC Leung 2016/07/07 17:01:54 Done.
+// Possible to return null, which means no profile (including user manager) can
Peter Kasting 2016/07/01 00:53:24 The user manager isn't a profile, so this sentence
WC Leung 2016/07/07 17:01:54 Revised the comment. PTAL.
+// be opened.
+Profile* GetFallbackStartupProfile();
+#endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
+
#endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_

Powered by Google App Engine
This is Rietveld 408576698