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-inl.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.h" |
12 #include "content/browser/renderer_host/render_view_host.h" | 12 #include "content/browser/renderer_host/render_view_host.h" |
13 #include "content/common/notification_service.h" | 13 #include "content/common/notification_service.h" |
14 | 14 |
15 template <typename T> | 15 template <typename T> |
16 struct MatchSecond { | 16 struct MatchSecond { |
17 explicit MatchSecond(const T& t) : value(t) {} | 17 explicit MatchSecond(const T& t) : value(t) {} |
18 | 18 |
19 template<typename Pair> | 19 template<typename Pair> |
20 bool operator()(const Pair& p) const { | 20 bool operator()(const Pair& p) const { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 void CertStore::Observe(int type, | 138 void CertStore::Observe(int type, |
139 const NotificationSource& source, | 139 const NotificationSource& source, |
140 const NotificationDetails& details) { | 140 const NotificationDetails& details) { |
141 DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED || | 141 DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED || |
142 type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED); | 142 type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED); |
143 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); | 143 RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); |
144 DCHECK(rph); | 144 DCHECK(rph); |
145 RemoveCertsForRenderProcesHost(rph->id()); | 145 RemoveCertsForRenderProcesHost(rph->id()); |
146 } | 146 } |
OLD | NEW |