| 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 f2543b7a92ca9410de1febaa1cff6636dad9ac9b..b16c6a77133cdca90ef2bf1577890e643ec0f9a3 100644
|
| --- a/chrome/browser/search_engines/template_url_service_android.h
|
| +++ b/chrome/browser/search_engines/template_url_service_android.h
|
| @@ -7,8 +7,8 @@
|
|
|
| #include "base/android/jni_helper.h"
|
| #include "base/android/scoped_java_ref.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| -#include "content/public/browser/notification_registrar.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/search_engines/template_url_service.h"
|
|
|
| class TemplateURL;
|
| class TemplateURLService;
|
| @@ -17,7 +17,7 @@ class TemplateURLService;
|
| // Android wrapper of the TemplateUrlService which provides access from the Java
|
| // layer. Note that on Android, there's only a single profile, and therefore
|
| // a single instance of this wrapper.
|
| -class TemplateUrlServiceAndroid : public content::NotificationObserver {
|
| +class TemplateUrlServiceAndroid {
|
| public:
|
| TemplateUrlServiceAndroid(JNIEnv* env, jobject obj);
|
|
|
| @@ -41,11 +41,6 @@ class TemplateUrlServiceAndroid : public content::NotificationObserver {
|
| jstring jquery,
|
| jstring jcurrent_url);
|
|
|
| - // NotificationObserver:
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) OVERRIDE;
|
| -
|
| static bool Register(JNIEnv* env);
|
|
|
| private:
|
| @@ -53,12 +48,15 @@ class TemplateUrlServiceAndroid : public content::NotificationObserver {
|
|
|
| bool IsPrepopulatedTemplate(TemplateURL* url);
|
|
|
| + void OnTemplateURLServiceLoaded();
|
| +
|
| JavaObjectWeakGlobalRef weak_java_obj_;
|
| - content::NotificationRegistrar registrar_;
|
|
|
| // Pointer to the TemplateUrlService for the main profile.
|
| TemplateURLService* template_url_service_;
|
|
|
| + scoped_ptr<TemplateURLService::Subscription> template_url_subscription_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid);
|
| };
|
|
|
|
|