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

Unified Diff: chrome/browser/ui/search/search.h

Issue 11876045: [Search] Store and recall search terms using NavigationEntry to improve search term extraction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: reupload Created 7 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
« no previous file with comments | « chrome/browser/sessions/session_types_unittest.cc ('k') | chrome/browser/ui/search/search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search.h
diff --git a/chrome/browser/ui/search/search.h b/chrome/browser/ui/search/search.h
index d7364b74e38501a170cda9738853e06223504ff7..fbfeef87157c8e709ffcfb3c944c42d16f4540ea 100644
--- a/chrome/browser/ui/search/search.h
+++ b/chrome/browser/ui/search/search.h
@@ -10,13 +10,23 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/string16.h"
class GURL;
class Profile;
+namespace content {
+class NavigationEntry;
+}
+
namespace chrome {
namespace search {
+// The key used to store search terms data in the NavigationEntry to be later
+// displayed in the Omnibox. With the context of the user's exact query,
+// InstantController sets the correct search terms to be displayed.
+extern const char kInstantExtendedSearchTermsKey[];
+
// Returns whether the Instant extended API is enabled for the given |profile|.
// |profile| may not be NULL.
bool IsInstantExtendedAPIEnabled(Profile* profile);
@@ -37,6 +47,11 @@ bool IsQueryExtractionEnabled(Profile* profile);
// Force query extraction to be enabled for tests.
void EnableQueryExtractionForTesting();
+// Return the search terms attached to a specific NavigationEntry, or empty
+// string otherwise.
+string16 GetSearchTermsFromNavigationEntry(
+ const content::NavigationEntry* entry);
+
// Returns true if |url| has the same scheme, host, port and path as the
// Instant URL set via --instant-url.
bool IsForcedInstantURL(const GURL& url);
« no previous file with comments | « chrome/browser/sessions/session_types_unittest.cc ('k') | chrome/browser/ui/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698