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

Unified Diff: chrome/browser/search_engines/search_terms_data.cc

Issue 10879043: Centralize logic around Instant modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed to CreateInstant; fixed ordering Created 8 years, 4 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/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 ea3e723b96947e7299ef557e82cfcd692a638c4f..9a5b2959d5f579623e4f469c1f7545695fc90a7e 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_util.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/search/search.h"
#include "content/public/browser/browser_thread.h"
#include "googleurl/src/gurl.h"
@@ -112,10 +111,10 @@ string16 UIThreadSearchTermsData::GetRlzParameterValue() const {
std::string UIThreadSearchTermsData::InstantEnabledParam() const {
DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (InstantController::IsEnabled(profile_)) {
- return std::string(chrome::search::IsInstantExtendedAPIEnabled(profile_) ?
- google_util::kInstantExtendedAPIParam : "ion") + "=1&";
- }
+ if (InstantController::IsExtendedAPIEnabled(profile_))
+ return std::string(google_util::kInstantExtendedAPIParam) + "=1&";
+ if (InstantController::IsInstantEnabled(profile_))
+ return "ion=1&";
return std::string();
}

Powered by Google App Engine
This is Rietveld 408576698