| Index: chrome/browser/ui/views/apps/native_app_window_views_win.cc
|
| diff --git a/chrome/browser/ui/views/apps/native_app_window_views_win.cc b/chrome/browser/ui/views/apps/native_app_window_views_win.cc
|
| index 5bdf99938fd28f921e5deb0612d547902bc5703b..21b7fbb6f995cc462d99b4a12d42a279564e182d 100644
|
| --- a/chrome/browser/ui/views/apps/native_app_window_views_win.cc
|
| +++ b/chrome/browser/ui/views/apps/native_app_window_views_win.cc
|
| @@ -10,7 +10,6 @@
|
| #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"
|
| @@ -40,15 +39,15 @@ void NativeAppWindowViewsWin::OnBeforeWidgetInit(
|
| // If an app has any existing windows, ensure new ones are created on the
|
| // same desktop.
|
| apps::ShellWindow* any_existing_window =
|
| - apps::ShellWindowRegistry::Get(profile())->
|
| - GetCurrentShellWindowForApp(extension()->id());
|
| + apps::ShellWindowRegistry::Get(browser_context())
|
| + ->GetCurrentShellWindowForApp(extension()->id());
|
| chrome::HostDesktopType desktop_type;
|
| if (any_existing_window) {
|
| desktop_type = chrome::GetHostDesktopTypeForNativeWindow(
|
| any_existing_window->GetNativeWindow());
|
| } else {
|
| PerAppSettingsService* settings =
|
| - PerAppSettingsServiceFactory::GetForBrowserContext(profile());
|
| + PerAppSettingsServiceFactory::GetForBrowserContext(browser_context());
|
| if (settings->HasDesktopLastLaunchedFrom(extension()->id())) {
|
| desktop_type = settings->GetDesktopLastLaunchedFrom(extension()->id());
|
| } else {
|
|
|