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

Unified Diff: chrome/browser/ui/views/native_widget_factory.cc

Issue 2862113002: Linux Aura: Use incognito profile to theme incognito browser windows (Closed)
Patch Set: Created 3 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
Index: chrome/browser/ui/views/native_widget_factory.cc
diff --git a/chrome/browser/ui/views/native_widget_factory.cc b/chrome/browser/ui/views/native_widget_factory.cc
index 722d8de4e9a84033dbb08a3aa92d1c2ed15283a1..3b73127aee34d2b79e29540fcf8615cd28a4782f 100644
--- a/chrome/browser/ui/views/native_widget_factory.cc
+++ b/chrome/browser/ui/views/native_widget_factory.cc
@@ -42,6 +42,9 @@ views::NativeWidget* CreateNativeWidget(
window = native_widget_aura->GetNativeWindow();
native_widget = native_widget_aura;
}
- SetThemeProfileForWindow(window, profile);
+ // Use the original profile because |window| may outlive the profile
+ // of the context window. This can happen with incognito profiles.
+ // However, the original profile will stick around until shutdown.
+ SetThemeProfileForWindow(window, profile->GetOriginalProfile());
sky 2017/05/04 23:24:09 I think it's worth a comment that BrowserView rese
Tom (Use chromium acct) 2017/05/09 05:12:26 Done.
return native_widget;
}

Powered by Google App Engine
This is Rietveld 408576698