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

Unified Diff: chrome/browser/tab_contents/tab_util.cc

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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: chrome/browser/tab_contents/tab_util.cc
===================================================================
--- chrome/browser/tab_contents/tab_util.cc (revision 118703)
+++ chrome/browser/tab_contents/tab_util.cc (working copy)
@@ -9,8 +9,8 @@
#include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/site_instance.h"
#include "content/public/browser/render_view_host_delegate.h"
+#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
@@ -37,9 +37,9 @@
return render_view_host->delegate()->GetAsWebContents();
}
-SiteInstance* GetSiteInstanceForNewTab(WebContents* source_contents,
- Profile* profile,
- const GURL& url) {
+content::SiteInstance* GetSiteInstanceForNewTab(WebContents* source_contents,
+ Profile* profile,
+ const GURL& url) {
// If url is a WebUI or extension, we need to be sure to use the right type
// of renderer process up front. Otherwise, we create a normal SiteInstance
// as part of creating the tab.
@@ -47,7 +47,7 @@
if (ChromeWebUIFactory::GetInstance()->UseWebUIForURL(profile, url) ||
(service &&
service->extensions()->GetHostedAppByURL(ExtensionURLInfo(url)))) {
- return SiteInstance::CreateSiteInstanceForURL(profile, url);
+ return content::SiteInstance::CreateSiteInstanceForURL(profile, url);
}
if (!source_contents)
@@ -55,9 +55,10 @@
// Don't use this logic when "--process-per-tab" is specified.
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessPerTab) &&
- SiteInstance::IsSameWebSite(source_contents->GetBrowserContext(),
- source_contents->GetURL(),
- url)) {
+ content::SiteInstance::IsSameWebSite(
+ source_contents->GetBrowserContext(),
+ source_contents->GetURL(),
+ url)) {
return source_contents->GetSiteInstance();
}
return NULL;

Powered by Google App Engine
This is Rietveld 408576698