From e80e4ae02c2cda76cb2e8cdec44687df19c16608 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 20 May 2015 16:14:57 +0530 Subject: [PATCH] remove usage global browser context --- atom/browser/api/atom_api_web_contents.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 3ccb297514ba..002739424f07 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -37,6 +37,7 @@ #include "native_mate/callback.h" #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" +#include "net/url_request/url_request_context.h" #include "atom/common/node_includes.h" @@ -278,7 +279,8 @@ void WebContents::DidStopLoading(content::RenderViewHost* render_view_host) { void WebContents::DidGetResourceResponseStart( const content::ResourceRequestDetails& details) { - auto context = AtomBrowserContext::Get(); + auto context = static_cast( + web_contents()->GetBrowserContext()); std::string headers; if (context) headers = context->GetNetworkDelegate()->GetResponseHeaders(details.url);