summaryrefslogtreecommitdiffstats
path: root/content/browser/cert_store_impl.cc
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 18:54:36 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 18:54:36 +0000
commitd9c2e51c51468cc6c514294d04314bcafc80f468 (patch)
treef0acf2c93a84cd98ab96f438da818e0e43e72ae3 /content/browser/cert_store_impl.cc
parent7a91c555f3e057f8be9010a4e5385678ce822c28 (diff)
downloadchromium_src-d9c2e51c51468cc6c514294d04314bcafc80f468.zip
chromium_src-d9c2e51c51468cc6c514294d04314bcafc80f468.tar.gz
chromium_src-d9c2e51c51468cc6c514294d04314bcafc80f468.tar.bz2
Revert 164120 - content/browser: Move more files into the content namespace.
Fixed most of the files found with the following command line: $ git grep --files-without-match --name-only "namespace content {" -- content/browser/{*.cc,*.h.*.mm} R=jam@chromium.org Review URL: https://codereview.chromium.org/11274038 TBR=tfarina@chromium.org Review URL: https://codereview.chromium.org/11273049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/cert_store_impl.cc')
-rw-r--r--content/browser/cert_store_impl.cc34
1 files changed, 14 insertions, 20 deletions
diff --git a/content/browser/cert_store_impl.cc b/content/browser/cert_store_impl.cc
index 877c1e4..e17e33a 100644
--- a/content/browser/cert_store_impl.cc
+++ b/content/browser/cert_store_impl.cc
@@ -15,10 +15,6 @@
#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) {}
@@ -30,10 +26,8 @@ struct MatchSecond {
T value;
};
-} // namespace
-
// static
-CertStore* CertStore::GetInstance() {
+content::CertStore* content::CertStore::GetInstance() {
return CertStoreImpl::GetInstance();
}
@@ -43,10 +37,11 @@ CertStoreImpl* CertStoreImpl::GetInstance() {
}
CertStoreImpl::CertStoreImpl() : next_cert_id_(1) {
- if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
+ if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
RegisterForNotification();
} else {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ content::BrowserThread::PostTask(
+ content::BrowserThread::UI, FROM_HERE,
base::Bind(&CertStoreImpl::RegisterForNotification,
base::Unretained(this)));
}
@@ -62,10 +57,10 @@ void CertStoreImpl::RegisterForNotification() {
// removed from cache, and remove the cert when we know it
// is not used anymore.
- registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- NotificationService::AllBrowserContextsAndSources());
- registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSED,
- NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
+ content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
+ content::NotificationService::AllBrowserContextsAndSources());
}
int CertStoreImpl::StoreCert(net::X509Certificate* cert, int process_id) {
@@ -173,13 +168,12 @@ void CertStoreImpl::RemoveCertsForRenderProcesHost(int process_id) {
}
void CertStoreImpl::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED ||
- type == NOTIFICATION_RENDERER_PROCESS_CLOSED);
- RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr();
+ 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();
DCHECK(rph);
RemoveCertsForRenderProcesHost(rph->GetID());
}
-
-} // namespace content