Index: chrome/browser/search_engines/search_terms_data.cc |
diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc |
index a1adfc9f4c8ae633b65957e100c7a54fb1dd74a4..2ae6da8bbffdfa99aad473822d95809aed69eb69 100644 |
--- a/chrome/browser/search_engines/search_terms_data.cc |
+++ b/chrome/browser/search_engines/search_terms_data.cc |
@@ -11,7 +11,6 @@ |
#include "chrome/browser/google/google_url_tracker.h" |
#include "chrome/browser/google/google_util.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/ui/browser_instant_controller.h" |
#include "chrome/browser/ui/search/search.h" |
#include "content/public/browser/browser_thread.h" |
#include "googleurl/src/gurl.h" |
@@ -130,26 +129,20 @@ std::string UIThreadSearchTermsData::GetSearchClient() const { |
std::string UIThreadSearchTermsData::InstantEnabledParam() const { |
DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || |
BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- if (profile_) { |
- uint32 instant_extended_api_version = |
- chrome::search::EmbeddedSearchPageVersion(profile_); |
- if (instant_extended_api_version == 0 && |
- chrome::BrowserInstantController::IsInstantEnabled(profile_)) |
- return "ion=1&"; |
- } |
+ if (chrome::search::IsInstantPrefEnabled(profile_) && |
+ !chrome::search::IsInstantExtendedAPIEnabled(profile_)) |
+ return "ion=1&"; |
return std::string(); |
} |
std::string UIThreadSearchTermsData::InstantExtendedEnabledParam() const { |
DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || |
BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- if (profile_) { |
- uint32 instant_extended_api_version = |
- chrome::search::EmbeddedSearchPageVersion(profile_); |
- if (instant_extended_api_version != 0) { |
- return std::string(google_util::kInstantExtendedAPIParam) + "=" + |
- base::Uint64ToString(instant_extended_api_version) + "&"; |
- } |
+ uint64 instant_extended_api_version = |
+ chrome::search::EmbeddedSearchPageVersion(profile_); |
+ if (instant_extended_api_version) { |
+ return std::string(google_util::kInstantExtendedAPIParam) + "=" + |
+ base::Uint64ToString(instant_extended_api_version) + "&"; |
} |
return std::string(); |
} |