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

Unified Diff: chrome/browser/google/google_util.cc

Issue 16035020: Move instant support to SearchTabHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed failing tests. Created 7 years, 6 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/google/google_util.cc
diff --git a/chrome/browser/google/google_util.cc b/chrome/browser/google/google_util.cc
index e2c09ecd930cc9a5127c68d41a45e0cdca448836..fc92fd3ba2a6e22ce0c81b58df86b560e8133342 100644
--- a/chrome/browser/google/google_util.cc
+++ b/chrome/browser/google/google_util.cc
@@ -17,6 +17,8 @@
#include "chrome/browser/google/google_url_tracker.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/google_update_settings.h"
+#include "content/public/browser/navigation_entry.h"
+#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
@@ -152,6 +154,13 @@ bool GetReactivationBrand(std::string* brand) {
#endif
+bool IsOmniboxGoogleSearchNavigation(const content::NavigationEntry& entry) {
+ const content::PageTransition stripped_transition =
+ PageTransitionStripQualifier(entry.GetTransitionType());
+ DCHECK(IsGoogleSearchUrl(entry.GetURL().spec()));
+ return stripped_transition == content::PAGE_TRANSITION_GENERATED;
+}
+
bool IsGoogleDomainUrl(const std::string& url,
SubdomainPermission subdomain_permission,
PortPermission port_permission) {

Powered by Google App Engine
This is Rietveld 408576698