Index: chrome/browser/search/search.cc |
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc |
index 409d14b4d863e5bd67b941dfe1fba5da5d3db6ba..1ba630cd60771a97270bedb3070c1f5f76b9c9e9 100644 |
--- a/chrome/browser/search/search.cc |
+++ b/chrome/browser/search/search.cc |
@@ -191,22 +191,7 @@ bool MatchesAnySearchURL(const GURL& url, TemplateURL* template_url) { |
return false; |
} |
-// Returns true if |contents| is rendered inside the Instant process for |
-// |profile|. |
-bool IsRenderedInInstantProcess(const content::WebContents* contents, |
- Profile* profile) { |
- const content::RenderProcessHost* process_host = |
- contents->GetRenderProcessHost(); |
- if (!process_host) |
- return false; |
- const InstantService* instant_service = |
- InstantServiceFactory::GetForProfile(profile); |
- if (!instant_service) |
- return false; |
- |
- return instant_service->IsInstantProcess(process_host->GetID()); |
-} |
// |url| should either have a secure scheme or have a non-HTTPS base URL that |
// the user specified using --google-base-url. (This allows testers to use |
@@ -332,7 +317,7 @@ struct NewTabURLDetails { |
default: |
// Use the local New Tab otherwise. |
return NewTabURLDetails(local_url, state); |
- }; |
+ } |
} |
GURL url; |
@@ -461,6 +446,21 @@ bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) { |
IsInstantURL(url, profile)); |
} |
+bool IsRenderedInInstantProcess(const content::WebContents* contents, |
+ Profile* profile) { |
+ const content::RenderProcessHost* process_host = |
+ contents->GetRenderProcessHost(); |
+ if (!process_host) |
+ return false; |
+ |
+ const InstantService* instant_service = |
+ InstantServiceFactory::GetForProfile(profile); |
+ if (!instant_service) |
+ return false; |
+ |
+ return instant_service->IsInstantProcess(process_host->GetID()); |
+} |
+ |
bool ShouldUseProcessPerSiteForInstantURL(const GURL& url, Profile* profile) { |
return ShouldAssignURLToInstantRenderer(url, profile) && |
(url.host() == chrome::kChromeSearchLocalNtpHost || |