[Merge to M65]Fix crash when open new tab from eol notification in guest session

TBR=skuhne@chromium.org,xiyuan@chromium.org
(cherry picked from commit 3327cfed3f0a3d7dca70057cafa0d271e20daeff)

Bug: 809271
Change-Id: I769b03038509625eeade3fb4787d0d73ff105f03
Reviewed-on: https://chromium-review.googlesource.com/924755
Reviewed-by: Stefan Kuhne <skuhne@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Xiaoyin Hu <xiaoyinh@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#538477}
Reviewed-on: https://chromium-review.googlesource.com/936042
Reviewed-by: Xiaoyin Hu <xiaoyinh@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#581}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index c5ab3d4..dcd20d5 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -490,8 +490,13 @@
 // static
 Profile* ProfileManager::CreateInitialProfile() {
   ProfileManager* const profile_manager = g_browser_process->profile_manager();
-  return profile_manager->GetProfile(profile_manager->user_data_dir().Append(
-      profile_manager->GetInitialProfileDir()));
+  Profile* profile =
+      profile_manager->GetProfile(profile_manager->user_data_dir().Append(
+          profile_manager->GetInitialProfileDir()));
+
+  if (profile_manager->ShouldGoOffTheRecord(profile))
+    return profile->GetOffTheRecordProfile();
+  return profile;
 }
 
 Profile* ProfileManager::GetProfile(const base::FilePath& profile_dir) {