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

Side by Side Diff: chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/banners/app_banner_manager.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/certificate_provider/certificate_provider_serv ice.h" 5 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv ice.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const net::CertificateList& certs) { 45 const net::CertificateList& certs) {
46 if (out_certs) 46 if (out_certs)
47 *out_certs = certs; 47 *out_certs = certs;
48 } 48 }
49 49
50 certificate_provider::CertificateInfo CreateCertInfo( 50 certificate_provider::CertificateInfo CreateCertInfo(
51 const std::string& cert_filename) { 51 const std::string& cert_filename) {
52 certificate_provider::CertificateInfo cert_info; 52 certificate_provider::CertificateInfo cert_info;
53 cert_info.certificate = 53 cert_info.certificate =
54 net::ImportCertFromFile(net::GetTestCertsDirectory(), cert_filename); 54 net::ImportCertFromFile(net::GetTestCertsDirectory(), cert_filename);
55 EXPECT_NE(nullptr, cert_info.certificate) << "Could not load " 55 EXPECT_TRUE(cert_info.certificate) << "Could not load " << cert_filename;
56 << cert_filename;
57 cert_info.type = net::SSLPrivateKey::Type::RSA; 56 cert_info.type = net::SSLPrivateKey::Type::RSA;
58 cert_info.supported_hashes.push_back(net::SSLPrivateKey::Hash::SHA256); 57 cert_info.supported_hashes.push_back(net::SSLPrivateKey::Hash::SHA256);
59 cert_info.max_signature_length_in_bytes = 123; 58 cert_info.max_signature_length_in_bytes = 123;
60 59
61 return cert_info; 60 return cert_info;
62 } 61 }
63 62
64 bool IsKeyEqualToCertInfo(const certificate_provider::CertificateInfo& info, 63 bool IsKeyEqualToCertInfo(const certificate_provider::CertificateInfo& info,
65 net::SSLPrivateKey* key) { 64 net::SSLPrivateKey* key) {
66 if (info.supported_hashes != key->GetDigestPreferences()) 65 if (info.supported_hashes != key->GetDigestPreferences())
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 EXPECT_EQ(net::OK, error); 479 EXPECT_EQ(net::OK, error);
481 480
482 // Unload the extension. 481 // Unload the extension.
483 service_->OnExtensionUnloaded(kExtension1); 482 service_->OnExtensionUnloaded(kExtension1);
484 483
485 task_runner_->RunUntilIdle(); 484 task_runner_->RunUntilIdle();
486 EXPECT_EQ(net::ERR_FAILED, error); 485 EXPECT_EQ(net::ERR_FAILED, error);
487 } 486 }
488 487
489 } // namespace chromeos 488 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/banners/app_banner_manager.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698