diff --git a/brightray/browser/net/devtools_network_transaction.cc b/brightray/browser/net/devtools_network_transaction.cc index 27e55f757c63..fa3343ef9879 100644 --- a/brightray/browser/net/devtools_network_transaction.cc +++ b/brightray/browser/net/devtools_network_transaction.cc @@ -15,12 +15,10 @@ namespace brightray { -namespace { - -const char kDevToolsEmulateNetworkConditionsClientId[] = - "X-DevTools-Emulate-Network-Conditions-Client-Id"; - -} // namespace +// static +const char + DevToolsNetworkTransaction::kDevToolsEmulateNetworkConditionsClientId[] = + "X-DevTools-Emulate-Network-Conditions-Client-Id"; DevToolsNetworkTransaction::DevToolsNetworkTransaction( DevToolsNetworkController* controller, diff --git a/brightray/browser/net/devtools_network_transaction.h b/brightray/browser/net/devtools_network_transaction.h index a03fe5106a47..3e16db0f2c2c 100644 --- a/brightray/browser/net/devtools_network_transaction.h +++ b/brightray/browser/net/devtools_network_transaction.h @@ -22,6 +22,8 @@ class DevToolsNetworkInterceptor; class DevToolsNetworkTransaction : public net::HttpTransaction { public: + static const char kDevToolsEmulateNetworkConditionsClientId[]; + DevToolsNetworkTransaction( DevToolsNetworkController* controller, scoped_ptr network_transaction); diff --git a/brightray/browser/net/devtools_network_transaction_factory.cc b/brightray/browser/net/devtools_network_transaction_factory.cc index 72367112f8fb..d1676a34d56e 100644 --- a/brightray/browser/net/devtools_network_transaction_factory.cc +++ b/brightray/browser/net/devtools_network_transaction_factory.cc @@ -7,6 +7,7 @@ #include "browser/net/devtools_network_controller.h" #include "browser/net/devtools_network_transaction.h" +#include "content/public/browser/service_worker_context.h" #include "net/base/net_errors.h" #include "net/http/http_network_layer.h" #include "net/http/http_network_transaction.h" @@ -18,6 +19,10 @@ DevToolsNetworkTransactionFactory::DevToolsNetworkTransactionFactory( net::HttpNetworkSession* session) : controller_(controller), network_layer_(new net::HttpNetworkLayer(session)) { + std::set headers; + headers.insert( + DevToolsNetworkTransaction::kDevToolsEmulateNetworkConditionsClientId); + content::ServiceWorkerContext::AddExcludedHeadersForFetchEvent(headers); } DevToolsNetworkTransactionFactory::~DevToolsNetworkTransactionFactory() {