| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 base::Unretained(frame_host->GetProcess() | 260 base::Unretained(frame_host->GetProcess() |
| 261 ->GetStoragePartition() | 261 ->GetStoragePartition() |
| 262 ->GetURLRequestContext()), | 262 ->GetURLRequestContext()), |
| 263 got_cookies_callback)); | 263 got_cookies_callback)); |
| 264 } | 264 } |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 } // namespace | 267 } // namespace |
| 268 | 268 |
| 269 NetworkHandler::NetworkHandler() | 269 NetworkHandler::NetworkHandler() |
| 270 : host_(nullptr), enabled_(false) { | 270 : DevToolsDomainHandler(Network::Metainfo::domainName), |
| 271 host_(nullptr), |
| 272 enabled_(false) { |
| 271 } | 273 } |
| 272 | 274 |
| 273 NetworkHandler::~NetworkHandler() { | 275 NetworkHandler::~NetworkHandler() { |
| 274 } | 276 } |
| 275 | 277 |
| 276 void NetworkHandler::Wire(UberDispatcher* dispatcher) { | 278 void NetworkHandler::Wire(UberDispatcher* dispatcher) { |
| 277 Network::Dispatcher::wire(dispatcher, this); | 279 Network::Dispatcher::wire(dispatcher, this); |
| 278 } | 280 } |
| 279 | 281 |
| 280 void NetworkHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { | 282 void NetworkHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 *result = false; | 398 *result = false; |
| 397 return Response::OK(); | 399 return Response::OK(); |
| 398 } | 400 } |
| 399 | 401 |
| 400 std::string NetworkHandler::UserAgentOverride() const { | 402 std::string NetworkHandler::UserAgentOverride() const { |
| 401 return enabled_ ? user_agent_ : std::string(); | 403 return enabled_ ? user_agent_ : std::string(); |
| 402 } | 404 } |
| 403 | 405 |
| 404 } // namespace protocol | 406 } // namespace protocol |
| 405 } // namespace content | 407 } // namespace content |
| OLD | NEW |