update devtools network interceptor to throttle uploads

This commit is contained in:
Robo 2016-03-14 02:35:22 +05:30
parent 95e63f6b8e
commit 215a81d0e6
13 changed files with 598 additions and 392 deletions

View file

@ -112,6 +112,15 @@ base::DictionaryValue* DevToolsNetworkProtocolHandler::HandleCommand(
return nullptr;
}
void DevToolsNetworkProtocolHandler::DevToolsAgentStateChanged(
content::DevToolsAgentHost* agent_host,
bool attached) {
scoped_ptr<DevToolsNetworkConditions> conditions;
if (attached)
conditions.reset(new DevToolsNetworkConditions(false));
UpdateNetworkState(agent_host, std::move(conditions));
}
scoped_ptr<base::DictionaryValue>
DevToolsNetworkProtocolHandler::CanEmulateNetworkConditions(
content::DevToolsAgentHost* agent_host,