Index: chrome/browser/prefs/session_startup_pref.cc |
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc |
index 9126203deeba9a3b95501a654cc9d16baccc036e..d8beaeda6a5d01fb31201891558e14b0ea9dbd84 100644 |
--- a/chrome/browser/prefs/session_startup_pref.cc |
+++ b/chrome/browser/prefs/session_startup_pref.cc |
@@ -99,7 +99,18 @@ void SessionStartupPref::SetStartupPref(PrefService* prefs, |
// static |
SessionStartupPref SessionStartupPref::GetStartupPref(Profile* profile) { |
DCHECK(profile); |
- return GetStartupPref(profile->GetPrefs()); |
+ |
+ PrefService* prefs = profile->GetPrefs(); |
+ |
+ // If a guest profile, force a return of the DEFAULT startup prefs. See |
sky
2017/06/20 16:45:27
When writing comments strive for comments that cla
shrike
2017/06/20 18:01:17
Acknowledged.
|
+ // https://crbug.com/723414 . |
+ if (profile->IsGuestSession()) { |
+ DCHECK(prefs); |
+ prefs->SetInteger(prefs::kRestoreOnStartup, |
sky
2017/06/20 16:45:27
Is it really necessary to modify the prefs here? I
shrike
2017/06/20 18:01:17
I was concerned about not changing the original co
|
+ TypeToPrefValue(SessionStartupPref::DEFAULT)); |
+ } |
+ |
+ return GetStartupPref(prefs); |
} |
// static |