summaryrefslogtreecommitdiffstats
path: root/content/browser/cert_store_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 03:22:20 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 03:22:20 +0000
commit464883218eccabb97b52f7bcc6a459709b69f87e (patch)
tree20e62a5781a44d6827019d61d075e264e87b0469 /content/browser/cert_store_impl.cc
parent3df72a134583efcc1e86c6abac2103c9800c5c13 (diff)
downloadchromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.zip
chromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.tar.gz
chromium_src-464883218eccabb97b52f7bcc6a459709b69f87e.tar.bz2
Move remaining files in content\browser to the content namespace.
Review URL: https://codereview.chromium.org/11340029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/cert_store_impl.cc')
-rw-r--r--content/browser/cert_store_impl.cc31
1 files changed, 17 insertions, 14 deletions
diff --git a/content/browser/cert_store_impl.cc b/content/browser/cert_store_impl.cc
index e17e33a..5a171f7 100644
--- a/content/browser/cert_store_impl.cc
+++ b/content/browser/cert_store_impl.cc
@@ -26,8 +26,10 @@ struct MatchSecond {
T value;
};
+namespace content {
+
// static
-content::CertStore* content::CertStore::GetInstance() {
+CertStore* CertStore::GetInstance() {
return CertStoreImpl::GetInstance();
}
@@ -37,11 +39,11 @@ 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 +59,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 +170,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