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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 976553003: Fix Launcher crash in ChromeOS guest mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to tapted comments. Created 5 years, 10 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/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index c40337660723557465cafd412a572d1a3c39a0f2..21824a02f1ac781a16208140d059548bcf56a26d 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -285,6 +285,13 @@ void AppListViewDelegate::SetProfile(Profile* new_profile) {
return;
}
+ // If we are in guest mode, the new profile should be an incognito profile.
+ // Otherwise, this may later hit a check (same condition as this one) in
+ // Browser::Browser when opening links in a browser window (see
+ // http://crbug.com/460437).
+ DCHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord())
+ << "Guest mode must use incognito profile";
+
// TODO(vadimt): Remove ScopedTracker below once crbug.com/431326 is fixed.
tracked_objects::ScopedTracker tracking_profile3(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.cc ('k') | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698