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

Unified Diff: content/browser/cert_store_impl.cc

Issue 11274038: content/browser: Move more files into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win - part2 Created 8 years, 2 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
« no previous file with comments | « content/browser/cert_store_impl.h ('k') | content/browser/child_process_security_policy_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cert_store_impl.cc
diff --git a/content/browser/cert_store_impl.cc b/content/browser/cert_store_impl.cc
index e17e33a4be2450ead448f761ded7b60391b4c4c5..877c1e4e4c78ba676c0e3abbc45549d3205d99db 100644
--- a/content/browser/cert_store_impl.cc
+++ b/content/browser/cert_store_impl.cc
@@ -15,6 +15,10 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+namespace content {
+
+namespace {
+
template <typename T>
struct MatchSecond {
explicit MatchSecond(const T& t) : value(t) {}
@@ -26,8 +30,10 @@ struct MatchSecond {
T value;
};
+} // namespace
+
// static
-content::CertStore* content::CertStore::GetInstance() {
+CertStore* CertStore::GetInstance() {
return CertStoreImpl::GetInstance();
}
@@ -37,11 +43,10 @@ CertStoreImpl* CertStoreImpl::GetInstance() {
}
CertStoreImpl::CertStoreImpl() : next_cert_id_(1) {
- if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
+ if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
RegisterForNotification();
} else {
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE,
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&CertStoreImpl::RegisterForNotification,
base::Unretained(this)));
}
@@ -57,10 +62,10 @@ void CertStoreImpl::RegisterForNotification() {
// removed from cache, and remove the cert when we know it
// is not used anymore.
- registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- content::NotificationService::AllBrowserContextsAndSources());
- registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
+ NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSED,
+ NotificationService::AllBrowserContextsAndSources());
}
int CertStoreImpl::StoreCert(net::X509Certificate* cert, int process_id) {
@@ -168,12 +173,13 @@ void CertStoreImpl::RemoveCertsForRenderProcesHost(int process_id) {
}
void CertStoreImpl::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED ||
- type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED);
- content::RenderProcessHost* rph =
- content::Source<content::RenderProcessHost>(source).ptr();
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED ||
+ type == NOTIFICATION_RENDERER_PROCESS_CLOSED);
+ RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr();
DCHECK(rph);
RemoveCertsForRenderProcesHost(rph->GetID());
}
+
+} // namespace content
« no previous file with comments | « content/browser/cert_store_impl.h ('k') | content/browser/child_process_security_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698