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

Side by Side Diff: net/cert/cert_database_mac.cc

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 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
« no previous file with comments | « net/cert/cert_database_ios.cc ('k') | net/cert/cert_database_nss.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 (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 "net/cert/cert_database.h" 5 #include "net/cert/cert_database.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/mac_logging.h" 10 #include "base/mac/mac_logging.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 void CertDatabase::SetMessageLoopForKeychainEvents() { 113 void CertDatabase::SetMessageLoopForKeychainEvents() {
114 // Shutdown will take care to delete the notifier on the right thread. 114 // Shutdown will take care to delete the notifier on the right thread.
115 if (notifier_.get()) 115 if (notifier_.get())
116 notifier_.release()->Shutdown(); 116 notifier_.release()->Shutdown();
117 117
118 notifier_.reset(new Notifier(this, base::MessageLoopForUI::current())); 118 notifier_.reset(new Notifier(this, base::MessageLoopForUI::current()));
119 } 119 }
120 120
121 CertDatabase::CertDatabase() 121 CertDatabase::CertDatabase()
122 : observer_list_(new ObserverListThreadSafe<Observer>) { 122 : observer_list_(new base::ObserverListThreadSafe<Observer>) {
123 } 123 }
124 124
125 CertDatabase::~CertDatabase() { 125 CertDatabase::~CertDatabase() {
126 // Shutdown will take care to delete the notifier on the right thread. 126 // Shutdown will take care to delete the notifier on the right thread.
127 if (notifier_.get()) 127 if (notifier_.get())
128 notifier_.release()->Shutdown(); 128 notifier_.release()->Shutdown();
129 } 129 }
130 130
131 int CertDatabase::CheckUserCert(X509Certificate* cert) { 131 int CertDatabase::CheckUserCert(X509Certificate* cert) {
132 if (!cert) 132 if (!cert)
(...skipping 30 matching lines...) Expand all
163 case errSecDuplicateItem: 163 case errSecDuplicateItem:
164 return OK; 164 return OK;
165 default: 165 default:
166 OSSTATUS_LOG(ERROR, err) << "CertDatabase failed to add cert to keychain"; 166 OSSTATUS_LOG(ERROR, err) << "CertDatabase failed to add cert to keychain";
167 // TODO(snej): Map the error code more intelligently. 167 // TODO(snej): Map the error code more intelligently.
168 return ERR_ADD_USER_CERT_FAILED; 168 return ERR_ADD_USER_CERT_FAILED;
169 } 169 }
170 } 170 }
171 171
172 } // namespace net 172 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_database_ios.cc ('k') | net/cert/cert_database_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698