| Index: chrome/browser/search/search.cc
|
| diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
|
| index f659cea157c139afea25f84c98e2dea825b2c3bb..58c376fe3f568b3cc408ad2f54cf655e30b20e91 100644
|
| --- a/chrome/browser/search/search.cc
|
| +++ b/chrome/browser/search/search.cc
|
| @@ -198,22 +198,7 @@ bool MatchesAnySearchURL(const GURL& 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
|
| @@ -472,6 +457,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 ||
|
|
|