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

Side by Side Diff: chrome/browser/ui/webui/certificate_viewer_webui.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/certificate_viewer_webui.h" 5 #include "chrome/browser/ui/webui/certificate_viewer_webui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA256_FINGERPRINT_LABEL)); 420 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA256_FINGERPRINT_LABEL));
421 node_details->SetString("payload.val", 421 node_details->SetString("payload.val",
422 x509_certificate_model::HashCertSHA256(cert)); 422 x509_certificate_model::HashCertSHA256(cert));
423 cert_sub_fields->Append(node_details = new base::DictionaryValue()); 423 cert_sub_fields->Append(node_details = new base::DictionaryValue());
424 node_details->SetString("label", 424 node_details->SetString("label",
425 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); 425 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL));
426 node_details->SetString("payload.val", 426 node_details->SetString("payload.val",
427 x509_certificate_model::HashCertSHA1(cert)); 427 x509_certificate_model::HashCertSHA1(cert));
428 428
429 // Send certificate information to javascript. 429 // Send certificate information to javascript.
430 web_ui()->CallJavascriptFunction("cert_viewer.getCertificateFields", 430 web_ui()->CallJavascriptFunctionUnsafe("cert_viewer.getCertificateFields",
431 root_list); 431 root_list);
432 } 432 }
433 433
434 int CertificateViewerDialogHandler::GetCertificateIndex( 434 int CertificateViewerDialogHandler::GetCertificateIndex(
435 const base::ListValue* args) const { 435 const base::ListValue* args) const {
436 int cert_index; 436 int cert_index;
437 double val; 437 double val;
438 if (!(args->GetDouble(0, &val))) 438 if (!(args->GetDouble(0, &val)))
439 return -1; 439 return -1;
440 cert_index = static_cast<int>(val); 440 cert_index = static_cast<int>(val);
441 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size())) 441 if (cert_index < 0 || cert_index >= static_cast<int>(cert_chain_.size()))
442 return -1; 442 return -1;
443 return cert_index; 443 return cert_index;
444 } 444 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler.cc ('k') | chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698