| Index: chrome/browser/tab_contents/background_contents.cc
|
| diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
|
| index 66c20a933616b44d92b062f1d283c14310e94e63..0c78a804839be545f95c328bcd3b00bc3b1ce79e 100644
|
| --- a/chrome/browser/tab_contents/background_contents.cc
|
| +++ b/chrome/browser/tab_contents/background_contents.cc
|
| @@ -52,7 +52,8 @@ BackgroundContents::BackgroundContents()
|
| BackgroundContents::~BackgroundContents() {
|
| if (!render_view_host_) // Will be null for unit tests.
|
| return;
|
| - Profile* profile = render_view_host_->process()->profile();
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + render_view_host_->process()->browser_context());
|
| NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED,
|
| Source<Profile>(profile),
|
| @@ -92,7 +93,8 @@ void BackgroundContents::DidNavigate(
|
| // extent a background page will be opened but will remain at about:blank.
|
| url_ = params.url;
|
|
|
| - Profile* profile = render_view_host->process()->profile();
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + render_view_host->process()->browser_context());
|
| NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
|
| Source<Profile>(profile),
|
| @@ -147,7 +149,8 @@ gfx::NativeWindow BackgroundContents::GetDialogRootWindow() {
|
| }
|
|
|
| void BackgroundContents::Close(RenderViewHost* render_view_host) {
|
| - Profile* profile = render_view_host->process()->profile();
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + render_view_host->process()->browser_context());
|
| NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_BACKGROUND_CONTENTS_CLOSED,
|
| Source<Profile>(profile),
|
| @@ -158,7 +161,8 @@ void BackgroundContents::Close(RenderViewHost* render_view_host) {
|
| void BackgroundContents::RenderViewGone(RenderViewHost* rvh,
|
| base::TerminationStatus status,
|
| int error_code) {
|
| - Profile* profile = rvh->process()->profile();
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(rvh->process()->browser_context());
|
| NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
|
| Source<Profile>(profile),
|
| @@ -182,7 +186,8 @@ RendererPreferences BackgroundContents::GetRendererPrefs(
|
| WebPreferences BackgroundContents::GetWebkitPrefs() {
|
| // TODO(rafaelw): Consider enabling the webkit_prefs.dom_paste_enabled for
|
| // apps.
|
| - Profile* profile = render_view_host_->process()->profile();
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + render_view_host_->process()->browser_context());
|
| return RenderViewHostDelegateHelper::GetWebkitPrefs(profile,
|
| false); // is_web_ui
|
| }
|
| @@ -190,12 +195,13 @@ WebPreferences BackgroundContents::GetWebkitPrefs() {
|
| void BackgroundContents::CreateNewWindow(
|
| int route_id,
|
| const ViewHostMsg_CreateWindow_Params& params) {
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + render_view_host_->process()->browser_context());
|
| delegate_view_helper_.CreateNewWindow(
|
| route_id,
|
| - render_view_host_->process()->profile(),
|
| + profile,
|
| render_view_host_->site_instance(),
|
| - ChromeWebUIFactory::GetInstance()->GetWebUIType(
|
| - render_view_host_->process()->profile(), url_),
|
| + ChromeWebUIFactory::GetInstance()->GetWebUIType(profile, url_),
|
| this,
|
| params.window_container_type,
|
| params.frame_name);
|
|
|