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

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

Issue 396583002: Stop depending on InstantService from BaseSearchProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/ui_thread_search_terms_data.cc
diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
index 5d6a81d870baca8febbb14cf96d08a8d0149b31c..a35c1f0d87b41158d39634282a6d07250a0bdf7b 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data.cc
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/google/google_profile_helper.h"
#include "chrome/browser/omnibox/omnibox_field_trial.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search/instant_service.h"
+#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/sync/glue/device_info.h"
#include "chrome/browser/themes/theme_service.h"
@@ -144,6 +146,14 @@ std::string UIThreadSearchTermsData::ForceInstantResultsParam(
return chrome::ForceInstantResultsParam(for_prerender);
}
+int UIThreadSearchTermsData::OmniboxStartMargin() const {
+ InstantService* instant_service =
+ InstantServiceFactory::GetForProfile(profile_);
+ // Android and iOS have no InstantService.
+ return instant_service ?
+ instant_service->omnibox_start_margin() : chrome::kDisableStartMargin;
+}
+
std::string UIThreadSearchTermsData::NTPIsThemedParam() const {
DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::UI));
« no previous file with comments | « chrome/browser/search_engines/ui_thread_search_terms_data.h ('k') | components/search_engines/search_terms_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698