Index: chromecast/shell/browser/cast_content_browser_client.cc |
diff --git a/chromecast/shell/browser/cast_content_browser_client.cc b/chromecast/shell/browser/cast_content_browser_client.cc |
index 720bbb82de7447cd05f7fc01aec294f7eefd608b..bffbba27118fd32cfac753b3ac507ae5697a4fb5 100644 |
--- a/chromecast/shell/browser/cast_content_browser_client.cc |
+++ b/chromecast/shell/browser/cast_content_browser_client.cc |
@@ -7,6 +7,7 @@ |
#include "base/command_line.h" |
#include "chromecast/shell/browser/cast_browser_context.h" |
#include "chromecast/shell/browser/cast_browser_main_parts.h" |
+#include "chromecast/shell/browser/cast_browser_process.h" |
#include "chromecast/shell/browser/geolocation/cast_access_token_store.h" |
#include "chromecast/shell/browser/url_request_context_factory.h" |
#include "content/public/browser/certificate_request_result_type.h" |
@@ -28,9 +29,8 @@ CastContentBrowserClient::~CastContentBrowserClient() { |
content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( |
const content::MainFunctionParams& parameters) { |
- shell_browser_main_parts_ = |
- new CastBrowserMainParts(parameters, url_request_context_factory_.get()); |
- return shell_browser_main_parts_; |
+ return new CastBrowserMainParts(parameters, |
+ url_request_context_factory_.get()); |
} |
void CastContentBrowserClient::RenderProcessWillLaunch( |
@@ -81,7 +81,8 @@ void CastContentBrowserClient::AppendExtraCommandLineSwitches( |
} |
content::AccessTokenStore* CastContentBrowserClient::CreateAccessTokenStore() { |
- return new CastAccessTokenStore(shell_browser_main_parts_->browser_context()); |
+ return new CastAccessTokenStore( |
+ CastBrowserProcess::GetInstance()->browser_context()); |
} |
void CastContentBrowserClient::OverrideWebkitPrefs( |