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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 client_->SendDeleteCookieResponse(command_id, | 282 client_->SendDeleteCookieResponse(command_id, |
283 DeleteCookieResponse::Create()); | 283 DeleteCookieResponse::Create()); |
284 } | 284 } |
285 | 285 |
286 | 286 |
287 Response NetworkHandler::CanEmulateNetworkConditions(bool* result) { | 287 Response NetworkHandler::CanEmulateNetworkConditions(bool* result) { |
288 *result = false; | 288 *result = false; |
289 return Response::OK(); | 289 return Response::OK(); |
290 } | 290 } |
291 | 291 |
292 Response NetworkHandler::EmulateNetworkConditions(bool offline, | 292 Response NetworkHandler::EmulateNetworkConditions( |
293 double latency, | 293 bool offline, |
294 double download_throughput, | 294 double latency, |
295 double upload_throughput) { | 295 double download_throughput, |
296 return Response::InternalError("EmulateNetworkConditions is not supported"); | 296 double upload_throughput, |
| 297 const std::string* connection_type) { |
| 298 return Response::FallThrough(); |
297 } | 299 } |
298 | 300 |
299 Response NetworkHandler::GetCertificateDetails( | 301 Response NetworkHandler::GetCertificateDetails( |
300 int certificate_id, | 302 int certificate_id, |
301 scoped_refptr<CertificateDetails>* result) { | 303 scoped_refptr<CertificateDetails>* result) { |
302 scoped_refptr<net::X509Certificate> cert; | 304 scoped_refptr<net::X509Certificate> cert; |
303 content::CertStore* cert_store = CertStore::GetInstance(); | 305 content::CertStore* cert_store = CertStore::GetInstance(); |
304 cert_store->RetrieveCert(certificate_id, &cert); | 306 cert_store->RetrieveCert(certificate_id, &cert); |
305 if (!cert.get()) | 307 if (!cert.get()) |
306 return Response::InvalidParams("certificateId"); | 308 return Response::InvalidParams("certificateId"); |
(...skipping 23 matching lines...) Expand all Loading... |
330 return Response::InternalError("Could not connect to view"); | 332 return Response::InternalError("Could not connect to view"); |
331 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); | 333 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); |
332 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( | 334 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
333 web_contents, certificate_id); | 335 web_contents, certificate_id); |
334 return Response::OK(); | 336 return Response::OK(); |
335 } | 337 } |
336 | 338 |
337 } // namespace network | 339 } // namespace network |
338 } // namespace devtools | 340 } // namespace devtools |
339 } // namespace content | 341 } // namespace content |
OLD | NEW |