Commit 70c44063 authored by gunsch@chromium.org's avatar gunsch@chromium.org

CastContentBrowserClient should not hold CastBrowserMainParts lifetime.

R=lcwu@chromium.org,byungchul@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/463563003

Cr-Commit-Position: refs/heads/master@{#289241}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289241 0039d316-1c4b-4281-b951-d872f2087c98
parent 30a6ae02
# Copyright 2014 The Chromium Authors. All Rights Reserved. # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -28,9 +28,9 @@ CastContentBrowserClient::~CastContentBrowserClient() { ...@@ -28,9 +28,9 @@ CastContentBrowserClient::~CastContentBrowserClient() {
content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts(
const content::MainFunctionParams& parameters) { const content::MainFunctionParams& parameters) {
shell_browser_main_parts_.reset( shell_browser_main_parts_ =
new CastBrowserMainParts(parameters, url_request_context_factory_.get())); new CastBrowserMainParts(parameters, url_request_context_factory_.get());
return shell_browser_main_parts_.get(); return shell_browser_main_parts_;
} }
void CastContentBrowserClient::RenderProcessWillLaunch( void CastContentBrowserClient::RenderProcessWillLaunch(
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ #define CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/content_browser_client.h" #include "content/public/browser/content_browser_client.h"
namespace chromecast { namespace chromecast {
...@@ -69,8 +70,9 @@ class CastContentBrowserClient: public content::ContentBrowserClient { ...@@ -69,8 +70,9 @@ class CastContentBrowserClient: public content::ContentBrowserClient {
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
private: private:
scoped_ptr<CastBrowserMainParts> shell_browser_main_parts_; // Note: BrowserMainLoop holds ownership of CastBrowserMainParts after it is
// created.
CastBrowserMainParts* shell_browser_main_parts_;
scoped_ptr<URLRequestContextFactory> url_request_context_factory_; scoped_ptr<URLRequestContextFactory> url_request_context_factory_;
DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment