Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1327)

Side by Side Diff: content/browser/devtools/protocol/network_handler.cc

Issue 1589703002: Surface SCT (Signed Certificate Timestamp) counts in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 ->set_subject(CertificateSubject::Create() 308 ->set_subject(CertificateSubject::Create()
309 ->set_name(name) 309 ->set_name(name)
310 ->set_san_dns_names(dns_names) 310 ->set_san_dns_names(dns_names)
311 ->set_san_ip_addresses(ip_addrs)) 311 ->set_san_ip_addresses(ip_addrs))
312 ->set_issuer(issuer) 312 ->set_issuer(issuer)
313 ->set_valid_from(valid_from.ToDoubleT()) 313 ->set_valid_from(valid_from.ToDoubleT())
314 ->set_valid_to(valid_to.ToDoubleT()); 314 ->set_valid_to(valid_to.ToDoubleT());
315 return Response::OK(); 315 return Response::OK();
316 } 316 }
317 317
318 Response NetworkHandler::GetCertificateTransparencySummary(
319 bool is_valid_ev,
320 int num_unknown_scts,
321 int num_invalid_scts,
322 int num_valid_scts,
323 std::string* result) {
324 if (!host_)
325 return Response::InternalError("Could not connect to view");
326 WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
327 web_contents->GetDelegate()->GetCertificateTransparencySummary(
328 is_valid_ev, num_unknown_scts, num_invalid_scts, num_valid_scts, result);
329 return Response::OK();
330 }
331
318 Response NetworkHandler::ShowCertificateViewer(int certificate_id) { 332 Response NetworkHandler::ShowCertificateViewer(int certificate_id) {
319 if (!host_) 333 if (!host_)
320 return Response::InternalError("Could not connect to view"); 334 return Response::InternalError("Could not connect to view");
321 WebContents* web_contents = WebContents::FromRenderFrameHost(host_); 335 WebContents* web_contents = WebContents::FromRenderFrameHost(host_);
322 web_contents->GetDelegate()->ShowCertificateViewerInDevTools( 336 web_contents->GetDelegate()->ShowCertificateViewerInDevTools(
323 web_contents, certificate_id); 337 web_contents, certificate_id);
324 return Response::OK(); 338 return Response::OK();
325 } 339 }
326 340
327 } // namespace network 341 } // namespace network
328 } // namespace devtools 342 } // namespace devtools
329 } // namespace content 343 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698