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

Unified Diff: trunk/src/chrome/browser/ui/views/apps/native_app_window_views_win.cc

Issue 163913004: Revert 250826 "Remove Profile dependency from apps::ShellWindow" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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: trunk/src/chrome/browser/ui/views/apps/native_app_window_views_win.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/apps/native_app_window_views_win.cc (revision 251093)
+++ trunk/src/chrome/browser/ui/views/apps/native_app_window_views_win.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/apps/per_app_settings_service.h"
#include "chrome/browser/apps/per_app_settings_service_factory.h"
#include "chrome/browser/metro_utils/metro_chrome_win.h"
+#include "chrome/browser/profiles/profile.h"
#include "extensions/common/extension.h"
#include "ui/aura/remote_root_window_host_win.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
@@ -39,15 +40,15 @@
// If an app has any existing windows, ensure new ones are created on the
// same desktop.
apps::ShellWindow* any_existing_window =
- apps::ShellWindowRegistry::Get(browser_context())
- ->GetCurrentShellWindowForApp(extension()->id());
+ apps::ShellWindowRegistry::Get(profile())->
+ GetCurrentShellWindowForApp(extension()->id());
chrome::HostDesktopType desktop_type;
if (any_existing_window) {
desktop_type = chrome::GetHostDesktopTypeForNativeWindow(
any_existing_window->GetNativeWindow());
} else {
PerAppSettingsService* settings =
- PerAppSettingsServiceFactory::GetForBrowserContext(browser_context());
+ PerAppSettingsServiceFactory::GetForBrowserContext(profile());
if (settings->HasDesktopLastLaunchedFrom(extension()->id())) {
desktop_type = settings->GetDesktopLastLaunchedFrom(extension()->id());
} else {

Powered by Google App Engine
This is Rietveld 408576698