| 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 "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
| 11 #include "content/browser/frame_host/render_frame_host_impl.h" | 11 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/browser/cert_store.h" | 14 #include "content/public/browser/cert_store.h" |
| 15 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
| 16 #include "content/public/browser/resource_context.h" | 16 #include "content/public/browser/resource_context.h" |
| 17 #include "content/public/browser/site_instance.h" | 17 #include "content/public/browser/site_instance.h" |
| 18 #include "content/public/browser/web_contents.h" |
| 19 #include "content/public/browser/web_contents_delegate.h" |
| 18 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 19 #include "net/cert/x509_cert_types.h" | 21 #include "net/cert/x509_cert_types.h" |
| 20 #include "net/cert/x509_certificate.h" | 22 #include "net/cert/x509_certificate.h" |
| 21 #include "net/cookies/cookie_store.h" | 23 #include "net/cookies/cookie_store.h" |
| 22 #include "net/url_request/url_request_context.h" | 24 #include "net/url_request/url_request_context.h" |
| 23 #include "net/url_request/url_request_context_getter.h" | 25 #include "net/url_request/url_request_context_getter.h" |
| 24 | 26 |
| 25 namespace content { | 27 namespace content { |
| 26 namespace devtools { | 28 namespace devtools { |
| 27 namespace network { | 29 namespace network { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 ->set_subject(CertificateSubject::Create() | 306 ->set_subject(CertificateSubject::Create() |
| 305 ->set_name(name) | 307 ->set_name(name) |
| 306 ->set_san_dns_names(dns_names) | 308 ->set_san_dns_names(dns_names) |
| 307 ->set_san_ip_addresses(ip_addrs)) | 309 ->set_san_ip_addresses(ip_addrs)) |
| 308 ->set_issuer(issuer) | 310 ->set_issuer(issuer) |
| 309 ->set_valid_from(valid_from.ToDoubleT()) | 311 ->set_valid_from(valid_from.ToDoubleT()) |
| 310 ->set_valid_to(valid_to.ToDoubleT()); | 312 ->set_valid_to(valid_to.ToDoubleT()); |
| 311 return Response::OK(); | 313 return Response::OK(); |
| 312 } | 314 } |
| 313 | 315 |
| 316 Response NetworkHandler::ShowCertificateViewer(int certificate_id) { |
| 317 if (!host_) |
| 318 return Response::InternalError("Could not connect to view"); |
| 319 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); |
| 320 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( |
| 321 web_contents, certificate_id); |
| 322 return Response::OK(); |
| 323 } |
| 324 |
| 314 } // namespace dom | 325 } // namespace dom |
| 315 } // namespace devtools | 326 } // namespace devtools |
| 316 } // namespace content | 327 } // namespace content |
| OLD | NEW |