| Index: chrome/browser/ui/search/search.cc
|
| diff --git a/chrome/browser/ui/search/search.cc b/chrome/browser/ui/search/search.cc
|
| index 796edb4ee64bf23013c73c455ea65b7d8c84b63d..71123712d5c49c13e2c29e173848483e8cc3e6ab 100644
|
| --- a/chrome/browser/ui/search/search.cc
|
| +++ b/chrome/browser/ui/search/search.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/chrome_version_info.h"
|
| +#include "content/public/browser/navigation_entry.h"
|
|
|
| #if !defined(OS_ANDROID)
|
| #include "chrome/browser/themes/theme_service.h"
|
| @@ -46,6 +47,9 @@ const char kDisablingSuffix[] = "DISABLED";
|
| namespace chrome {
|
| namespace search {
|
|
|
| +// static
|
| +const char kInstantExtendedSearchTermsKey[] = "search_terms";
|
| +
|
| // Check whether or not the Extended API should be used on the given profile.
|
| bool IsInstantExtendedAPIEnabled(Profile* profile) {
|
| return EmbeddedSearchPageVersion(profile) != 0;
|
| @@ -139,6 +143,13 @@ void EnableQueryExtractionForTesting() {
|
| #endif
|
| }
|
|
|
| +string16 GetSearchTermsFromNavigationEntry(
|
| + const content::NavigationEntry* entry) {
|
| + string16 search_terms;
|
| + entry->GetExtraData(kInstantExtendedSearchTermsKey, &search_terms);
|
| + return search_terms;
|
| +}
|
| +
|
| bool IsForcedInstantURL(const GURL& url) {
|
| CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| if (!command_line->HasSwitch(switches::kInstantURL))
|
|
|