| Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| index fc5299dc0795c529c909b771333d73bc46bd96fb..2bfbda213a645b39e3052867b26efac998444abe 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| @@ -30,6 +30,7 @@
|
| #include "chrome/browser/chromeos/status/network_menu_icon.h"
|
| #include "chrome/browser/chromeos/user_cros_settings_provider.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| @@ -38,6 +39,7 @@
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/time_format.h"
|
| +#include "content/browser/tab_contents/tab_contents.h"
|
| #include "content/common/notification_service.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| @@ -417,8 +419,10 @@ void InternetOptionsHandler::DisableCellularCallback(const ListValue* args) {
|
| void InternetOptionsHandler::BuyDataPlanCallback(const ListValue* args) {
|
| if (!web_ui_)
|
| return;
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
|
| Browser* browser = BrowserList::FindBrowserWithFeature(
|
| - web_ui_->GetProfile(), Browser::FEATURE_TABSTRIP);
|
| + profile, Browser::FEATURE_TABSTRIP);
|
| if (browser)
|
| browser->OpenMobilePlanTabAndActivate();
|
| }
|
| @@ -886,7 +890,9 @@ void InternetOptionsHandler::CreateModalPopup(views::WidgetDelegate* view) {
|
| gfx::NativeWindow InternetOptionsHandler::GetNativeWindow() const {
|
| // TODO(beng): This is an improper direct dependency on Browser. Route this
|
| // through some sort of delegate.
|
| - Browser* browser = BrowserList::FindBrowserWithProfile(web_ui_->GetProfile());
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
|
| + Browser* browser = BrowserList::FindBrowserWithProfile(profile);
|
| return browser->window()->GetNativeHandle();
|
| }
|
|
|
|
|