stop using x-devtools-emulate-network-conditions-client-id header

1086949
This commit is contained in:
Jeremy Apthorp 2018-10-02 11:08:10 -07:00
parent f514445f20
commit 3ded109c2e
4 changed files with 23 additions and 60 deletions

View file

@ -20,10 +20,8 @@
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
#include "services/network/throttling/throttling_network_transaction.h"
using content::BrowserThread;
using network::ThrottlingNetworkTransaction;
namespace atom {
@ -269,11 +267,6 @@ void AtomNetworkDelegate::SetResponseListenerInIO(ResponseEvent type,
response_listeners_[type] = {std::move(patterns), std::move(callback)};
}
void AtomNetworkDelegate::SetDevToolsNetworkEmulationClientId(
const std::string& client_id) {
client_id_ = client_id;
}
int AtomNetworkDelegate::OnBeforeURLRequest(
net::URLRequest* request,
const net::CompletionCallback& callback,
@ -297,10 +290,6 @@ int AtomNetworkDelegate::OnBeforeStartTransaction(
net::URLRequest* request,
const net::CompletionCallback& callback,
net::HttpRequestHeaders* headers) {
if (!client_id_.empty())
headers->SetHeader(network::ThrottlingNetworkTransaction::
kDevToolsEmulateNetworkConditionsClientId,
client_id_);
if (!base::ContainsKey(response_listeners_, kOnBeforeSendHeaders))
return net::OK;