OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/devtools/protocol/network_handler.h" | 5 #include "content/browser/devtools/protocol/network_handler.h" |
6 | 6 |
7 #include "content/public/browser/content_browser_client.h" | 7 #include "content/public/browser/content_browser_client.h" |
8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 namespace devtools { | 11 namespace devtools { |
12 namespace network { | 12 namespace network { |
13 | 13 |
14 typedef DevToolsProtocolClient::Response Response; | 14 typedef DevToolsProtocolClient::Response Response; |
15 | 15 |
16 NetworkHandler::NetworkHandler() : host_(nullptr) { | 16 NetworkHandler::NetworkHandler() : host_(nullptr) { |
17 } | 17 } |
18 | 18 |
19 NetworkHandler::~NetworkHandler() { | 19 NetworkHandler::~NetworkHandler() { |
20 } | 20 } |
21 | 21 |
22 void NetworkHandler::SetRenderViewHost(RenderViewHost* host) { | 22 void NetworkHandler::SetRenderFrameHost(RenderFrameHost* host) { |
23 host_ = host; | 23 host_ = host; |
24 } | 24 } |
25 | 25 |
26 Response NetworkHandler::ClearBrowserCache() { | 26 Response NetworkHandler::ClearBrowserCache() { |
27 if (host_) | 27 if (host_) |
28 GetContentClient()->browser()->ClearCache(host_); | 28 GetContentClient()->browser()->ClearCache(host_); |
29 return Response::OK(); | 29 return Response::OK(); |
30 } | 30 } |
31 | 31 |
32 Response NetworkHandler::ClearBrowserCookies() { | 32 Response NetworkHandler::ClearBrowserCookies() { |
(...skipping 10 matching lines...) Expand all Loading... |
43 Response NetworkHandler::EmulateNetworkConditions(bool offline, | 43 Response NetworkHandler::EmulateNetworkConditions(bool offline, |
44 double latency, | 44 double latency, |
45 double download_throughput, | 45 double download_throughput, |
46 double upload_throughput) { | 46 double upload_throughput) { |
47 return Response::FallThrough(); | 47 return Response::FallThrough(); |
48 } | 48 } |
49 | 49 |
50 } // namespace dom | 50 } // namespace dom |
51 } // namespace devtools | 51 } // namespace devtools |
52 } // namespace content | 52 } // namespace content |
OLD | NEW |