Index: chrome/browser/search_engines/template_url_service_android.h |
diff --git a/chrome/browser/search_engines/template_url_service_android.h b/chrome/browser/search_engines/template_url_service_android.h |
index af5f38c08a212727731e298448ae5df747711b74..acf02babbc6761f0ae44fa3fbdca5357d2d10cd1 100644 |
--- a/chrome/browser/search_engines/template_url_service_android.h |
+++ b/chrome/browser/search_engines/template_url_service_android.h |
@@ -27,7 +27,12 @@ class TemplateUrlServiceAndroid : public TemplateURLServiceObserver { |
void SetUserSelectedDefaultSearchProvider( |
JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj, |
- jint selected_index); |
+ const base::android::JavaParamRef<jstring>& jkeyword); |
+ // Update template_urls and return the index of default search provider in the |
Peter Kasting
2016/11/02 00:34:03
Nit: Function comments should be descriptive ("Upd
ltian
2016/11/22 21:51:41
I will wrap the operations about populating and so
Peter Kasting
2016/11/22 21:57:10
Are you planning to call these methods from every
ltian
2016/11/22 23:25:10
Yes, it is a pull-based system and I think it is f
Peter Kasting
2016/11/22 23:36:20
Then why not force the caller to use that access p
|
+ // list. Note that this function will also reorder the list so that if any |
+ // custom search engine is set as default, it will be placed before the rest |
+ // of |
Peter Kasting
2016/11/02 00:34:03
Nit: Rewrap
ltian
2016/11/22 21:51:41
Done.
|
+ // custom ones and after all the prepopulated ones. |
jint GetDefaultSearchProvider( |
Peter Kasting
2016/11/02 00:34:03
Nit: GetDefaultSearchProviderIndex()?
ltian
2016/11/22 21:51:41
Done.
|
JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj); |
@@ -71,15 +76,13 @@ class TemplateUrlServiceAndroid : public TemplateURLServiceObserver { |
base::android::ScopedJavaLocalRef<jstring> GetSearchEngineUrlFromTemplateUrl( |
JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj, |
- jint index); |
+ const base::android::JavaParamRef<jstring>& jkeyword); |
static bool Register(JNIEnv* env); |
private: |
~TemplateUrlServiceAndroid() override; |
- bool IsPrepopulatedTemplate(TemplateURL* url); |
- |
void OnTemplateURLServiceLoaded(); |
// TemplateUrlServiceObserver: |
@@ -92,6 +95,8 @@ class TemplateUrlServiceAndroid : public TemplateURLServiceObserver { |
std::unique_ptr<TemplateURLService::Subscription> template_url_subscription_; |
+ std::vector<TemplateURL*> template_urls_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); |
}; |