| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/cert_store.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "content/browser/renderer_host/render_process_host.h" | 11 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 12 #include "content/browser/renderer_host/render_view_host.h" | 12 #include "content/browser/renderer_host/render_view_host.h" |
| 13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "content/public/browser/notification_types.h" | 14 #include "content/public/browser/notification_types.h" |
| 15 | 15 |
| 16 template <typename T> | 16 template <typename T> |
| 17 struct MatchSecond { | 17 struct MatchSecond { |
| 18 explicit MatchSecond(const T& t) : value(t) {} | 18 explicit MatchSecond(const T& t) : value(t) {} |
| 19 | 19 |
| 20 template<typename Pair> | 20 template<typename Pair> |
| 21 bool operator()(const Pair& p) const { | 21 bool operator()(const Pair& p) const { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 if (process_ids.first != process_ids.second) | 148 if (process_ids.first != process_ids.second) |
| 149 process_id_to_cert_id_.erase(process_ids.first, process_ids.second); | 149 process_id_to_cert_id_.erase(process_ids.first, process_ids.second); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void CertStore::Observe(int type, | 152 void CertStore::Observe(int type, |
| 153 const content::NotificationSource& source, | 153 const content::NotificationSource& source, |
| 154 const content::NotificationDetails& details) { | 154 const content::NotificationDetails& details) { |
| 155 DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED || | 155 DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED || |
| 156 type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED); | 156 type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED); |
| 157 RenderProcessHost* rph = content::Source<RenderProcessHost>(source).ptr(); | 157 content::RenderProcessHost* rph = |
| 158 content::Source<content::RenderProcessHost>(source).ptr(); |
| 158 DCHECK(rph); | 159 DCHECK(rph); |
| 159 RemoveCertsForRenderProcesHost(rph->id()); | 160 RemoveCertsForRenderProcesHost(rph->GetID()); |
| 160 } | 161 } |
| OLD | NEW |