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

Side by Side Diff: content/browser/cert_store_impl.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/child_process_launcher.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 "content/browser/cert_store_impl.h" 5 #include "content/browser/cert_store_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return false; 114 return false;
115 if (cert) 115 if (cert)
116 *cert = iter->second; 116 *cert = iter->second;
117 return true; 117 return true;
118 } 118 }
119 119
120 void CertStoreImpl::RemoveCertInternal(int cert_id) { 120 void CertStoreImpl::RemoveCertInternal(int cert_id) {
121 CertMap::iterator cert_iter = id_to_cert_.find(cert_id); 121 CertMap::iterator cert_iter = id_to_cert_.find(cert_id);
122 DCHECK(cert_iter != id_to_cert_.end()); 122 DCHECK(cert_iter != id_to_cert_.end());
123 123
124 ReverseCertMap::iterator id_iter = cert_to_id_.find(cert_iter->second); 124 ReverseCertMap::iterator id_iter = cert_to_id_.find(cert_iter->second.get());
125 DCHECK(id_iter != cert_to_id_.end()); 125 DCHECK(id_iter != cert_to_id_.end());
126 cert_to_id_.erase(id_iter); 126 cert_to_id_.erase(id_iter);
127 127
128 cert_iter->second->Release(); 128 cert_iter->second->Release();
129 id_to_cert_.erase(cert_iter); 129 id_to_cert_.erase(cert_iter);
130 } 130 }
131 131
132 void CertStoreImpl::RemoveCertsForRenderProcesHost(int process_id) { 132 void CertStoreImpl::RemoveCertsForRenderProcesHost(int process_id) {
133 base::AutoLock auto_lock(cert_lock_); 133 base::AutoLock auto_lock(cert_lock_);
134 134
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 const NotificationSource& source, 173 const NotificationSource& source,
174 const NotificationDetails& details) { 174 const NotificationDetails& details) {
175 DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED || 175 DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED ||
176 type == NOTIFICATION_RENDERER_PROCESS_CLOSED); 176 type == NOTIFICATION_RENDERER_PROCESS_CLOSED);
177 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); 177 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr();
178 DCHECK(rph); 178 DCHECK(rph);
179 RemoveCertsForRenderProcesHost(rph->GetID()); 179 RemoveCertsForRenderProcesHost(rph->GetID());
180 } 180 }
181 181
182 } // namespace content 182 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698