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

Unified Diff: chromeos/network/network_cert_migrator.cc

Issue 560903003: Remove implicit conversions from scoped_refptr to T* in chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chromeos/network/network_cert_migrator.cc
diff --git a/chromeos/network/network_cert_migrator.cc b/chromeos/network/network_cert_migrator.cc
index 31f476aef6f85cb729173a54c0f4b3013363b550..1b5082009826aa1578eeae687c5926dccae7fffa 100644
--- a/chromeos/network/network_cert_migrator.cc
+++ b/chromeos/network/network_cert_migrator.cc
@@ -129,7 +129,7 @@ class NetworkCertMigrator::MigrationTask
int real_slot_id = -1;
scoped_refptr<net::X509Certificate> cert =
FindCertificateWithPkcs11Id(pkcs11_id, &real_slot_id);
- if (!cert) {
+ if (!cert.get()) {
LOG(WARNING) << "No matching cert found, removing the certificate "
"configuration from network " << service_path;
chromeos::client_cert::SetEmptyShillProperties(config_type,
@@ -141,7 +141,7 @@ class NetworkCertMigrator::MigrationTask
return;
}
- if (cert && real_slot_id != configured_slot_id) {
+ if (cert.get() && real_slot_id != configured_slot_id) {
VLOG(1) << "Network " << service_path
<< " is configured with no or an incorrect slot id.";
chromeos::client_cert::SetShillProperties(
@@ -174,7 +174,7 @@ class NetworkCertMigrator::MigrationTask
scoped_refptr<net::X509Certificate> cert =
FindCertificateWithNickname(nickname);
- if (!cert) {
+ if (!cert.get()) {
VLOG(2) << "No matching cert found.";
return;
}
« no previous file with comments | « chromeos/network/client_cert_resolver_unittest.cc ('k') | chromeos/network/network_cert_migrator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698