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

Unified Diff: chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc

Issue 287733003: Avoid invoking copy constructor at chrome startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc
diff --git a/chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc b/chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc
index c7eefd3d0e1a997f3c6199040addd07eb9367a72..c3875e45974f844d3d7144f4071e43469d0a4896 100644
--- a/chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc
+++ b/chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc
@@ -143,25 +143,25 @@ static const unsigned char kPublicKeyICA4[] = {
// Info for trusted ICA certs.
struct ICACertInfo {
- net::SHA1HashValue fingerprint;
+ const net::SHA1HashValue* fingerprint;
SECItem public_key;
};
// List of allowed / trusted ICAs.
static const ICACertInfo kAllowedICAs[] = {
- { kFingerprintICA1,
+ { &kFingerprintICA1,
{ siDERCertBuffer,
const_cast<unsigned char*>(kPublicKeyICA1),
sizeof(kPublicKeyICA1) } },
- { kFingerprintICA2,
+ { &kFingerprintICA2,
{ siDERCertBuffer,
const_cast<unsigned char*>(kPublicKeyICA2),
sizeof(kPublicKeyICA2) } },
- { kFingerprintICA3,
+ { &kFingerprintICA3,
{ siDERCertBuffer,
const_cast<unsigned char*>(kPublicKeyICA3),
sizeof(kPublicKeyICA3) } },
- { kFingerprintICA4,
+ { &kFingerprintICA4,
{ siDERCertBuffer,
const_cast<unsigned char*>(kPublicKeyICA4),
sizeof(kPublicKeyICA4) } },
@@ -176,7 +176,7 @@ typedef scoped_ptr<
// Returns -1, if no such ICA is found.
static int GetICAWithFingerprint(const net::SHA1HashValue& fingerprint) {
for (size_t i = 0; i < arraysize(kAllowedICAs); ++i) {
- if (fingerprint.Equals(kAllowedICAs[i].fingerprint))
+ if (kAllowedICAs[i].fingerprint->Equals(fingerprint))
return static_cast<int>(i);
}
return -1;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698