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

Unified Diff: content/browser/site_instance_impl.cc

Issue 11340029: Move remaining files in content\browser to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
Index: content/browser/site_instance_impl.cc
===================================================================
--- content/browser/site_instance_impl.cc (revision 164795)
+++ content/browser/site_instance_impl.cc (working copy)
@@ -18,12 +18,7 @@
#include "content/public/common/url_constants.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
-using content::BrowserContext;
-using content::RenderProcessHost;
-using content::RenderProcessHostImpl;
-using content::SiteInstance;
-using content::StoragePartitionImpl;
-using content::WebUIControllerFactory;
+namespace content {
static bool IsURLSameAsAnySiteInstance(const GURL& url) {
if (!url.is_valid())
@@ -50,12 +45,12 @@
has_site_(false) {
DCHECK(browsing_instance);
- registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- content::NotificationService::AllBrowserContextsAndSources());
+ registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
+ NotificationService::AllBrowserContextsAndSources());
}
SiteInstanceImpl::~SiteInstanceImpl() {
- content::GetContentClient()->browser()->SiteInstanceDeleting(this);
+ GetContentClient()->browser()->SiteInstanceDeleting(this);
// Now that no one is referencing us, we can safely remove ourselves from
// the BrowsingInstance. Any future visits to a page from this site
@@ -75,7 +70,7 @@
// If we would use process-per-site for this site, also check if there is an
// existing process that we would use if GetProcess() were called.
- content::BrowserContext* browser_context =
+ BrowserContext* browser_context =
browsing_instance_->browser_context();
if (has_site_ &&
RenderProcessHostImpl::ShouldUseProcessPerSite(browser_context, site_) &&
@@ -138,7 +133,7 @@
process_, site_);
}
- content::GetContentClient()->browser()->SiteInstanceGotProcess(this);
+ GetContentClient()->browser()->SiteInstanceGotProcess(this);
if (has_site_)
LockToOrigin();
@@ -309,15 +304,15 @@
/*static*/
GURL SiteInstanceImpl::GetEffectiveURL(BrowserContext* browser_context,
const GURL& url) {
- return content::GetContentClient()->browser()->
+ return GetContentClient()->browser()->
GetEffectiveURL(browser_context, url);
}
void SiteInstanceImpl::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED);
- RenderProcessHost* rph = content::Source<RenderProcessHost>(source).ptr();
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ DCHECK(type == NOTIFICATION_RENDERER_PROCESS_TERMINATED);
tfarina 2012/10/30 22:19:06 DCHECK_EQ
+ RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr();
if (rph == process_)
process_ = NULL;
}
@@ -330,3 +325,5 @@
policy->LockToOrigin(process_->GetID(), site_);
}
}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698