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

Unified Diff: chrome/browser/instant/search.cc

Issue 12387026: Expose getSearchTerms to tab_model for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again... Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/android/tab_model/tab_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/search.cc
diff --git a/chrome/browser/instant/search.cc b/chrome/browser/instant/search.cc
index 3ae32ea21e894a5ae751316d9bd8827ef6222a69..2816d5250fcd482487b0feb49968e12830d62cdf 100644
--- a/chrome/browser/instant/search.cc
+++ b/chrome/browser/instant/search.cc
@@ -188,10 +188,13 @@ string16 GetSearchTermsImpl(const content::WebContents* contents,
// faking search terms in the URL. Random pages can't get into the Instant
// renderer and scripting doesn't work cross-process, so if the page is in
// the Instant process, we know it isn't being exploited.
+ // Since iOS and Android doesn't use the instant framework, these checks are
+ // disabled for the two platforms.
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
+#if !defined(OS_IOS) && !defined(OS_ANDROID)
if (!IsRenderedInInstantProcess(contents, profile))
return string16();
-
+#endif // !defined(OS_IOS) && !defined(OS_ANDROID)
// Check to see if search terms have already been extracted.
string16 search_terms = GetSearchTermsFromNavigationEntry(entry);
if (!search_terms.empty())
« no previous file with comments | « no previous file | chrome/browser/ui/android/tab_model/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698