1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/devtools/protocol/network_handler.h"
7 #include "content/public/browser/content_browser_client.h"
8 #include "content/public/common/content_client.h"
14 typedef DevToolsProtocolClient::Response Response
;
16 NetworkHandler::NetworkHandler() : host_(nullptr) {
19 NetworkHandler::~NetworkHandler() {
22 void NetworkHandler::SetRenderViewHost(RenderViewHost
* host
) {
26 Response
NetworkHandler::ClearBrowserCache() {
28 GetContentClient()->browser()->ClearCache(host_
);
29 return Response::OK();
32 Response
NetworkHandler::ClearBrowserCookies() {
34 GetContentClient()->browser()->ClearCookies(host_
);
35 return Response::OK();
38 Response
NetworkHandler::CanEmulateNetworkConditions(bool* result
) {
40 return Response::OK();
43 Response
NetworkHandler::EmulateNetworkConditions(bool offline
,
45 double download_throughput
,
46 double upload_throughput
) {
47 return Response::FallThrough();
51 } // namespace devtools
52 } // namespace content