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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions Created 5 years, 7 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
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 0e6b955ca7a33a7ad24c4ca7b359b655f1ffe04c..295ca318799c72b40fc99dfd9978b161f4bc6ab5 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -374,9 +374,9 @@ ChromeLauncherController::ChromeLauncherController(Profile* profile,
// Use the original profile as on chromeos we may get a temporary off the
// record profile, unless in guest session (where off the record profile is
// the right one).
- Profile* active_profile = ProfileManager::GetActiveUserProfile();
- profile_ = active_profile->IsGuestSession() ? active_profile :
- active_profile->GetOriginalProfile();
+ profile_ = ProfileManager::GetActiveUserProfile();
+ if (!profile_->IsGuestSession() && !profile_->IsSystemProfile())
+ profile_ = profile_->GetOriginalProfile();
app_sync_ui_state_ = AppSyncUIState::Get(profile_);
if (app_sync_ui_state_)
@@ -2052,7 +2052,8 @@ bool ChromeLauncherController::IsIncognito(
const content::WebContents* web_contents) const {
const Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- return profile->IsOffTheRecord() && !profile->IsGuestSession();
+ return profile->IsOffTheRecord() && !profile->IsGuestSession() &&
+ !profile->IsSystemProfile();
}
void ChromeLauncherController::CloseWindowedAppsFromRemovedExtension(
« no previous file with comments | « chrome/browser/profiles/profile_window.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698