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

Unified Diff: chrome/browser/importer/external_process_importer_host.h

Issue 23710022: Convert NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED to CallbackList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean-up Created 7 years, 2 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/importer/external_process_importer_host.h
diff --git a/chrome/browser/importer/external_process_importer_host.h b/chrome/browser/importer/external_process_importer_host.h
index e97da4f5017ee0d3caec7348e867ede31a3a1a55..d528ed83e2c604b76faa69c66f51365f2c8ac46f 100644
--- a/chrome/browser/importer/external_process_importer_host.h
+++ b/chrome/browser/importer/external_process_importer_host.h
@@ -13,9 +13,8 @@
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
#include "chrome/browser/importer/importer_progress_observer.h"
#include "chrome/browser/importer/profile_writer.h"
+#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/common/importer/importer_data_types.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
class ExternalProcessImporterClient;
@@ -29,8 +28,7 @@ struct SourceProfile;
// This class manages the import process. It creates the in-process half of the
// importer bridge and the external process importer client.
-class ExternalProcessImporterHost : public BaseBookmarkModelObserver,
- public content::NotificationObserver {
+class ExternalProcessImporterHost : public BaseBookmarkModelObserver {
public:
ExternalProcessImporterHost();
@@ -86,11 +84,8 @@ class ExternalProcessImporterHost : public BaseBookmarkModelObserver,
virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE;
virtual void BookmarkModelChanged() OVERRIDE;
- // content::NotificationObserver:
// Called when TemplateURLService has been loaded.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ void OnTemplateURLServiceLoaded();
// ShowWarningDialog() asks user to close the application that is owning the
// lock. They can retry or skip the importing process.
@@ -136,15 +131,15 @@ class ExternalProcessImporterHost : public BaseBookmarkModelObserver,
// True if we're waiting for the model to finish loading.
bool waiting_for_bookmarkbar_model_;
+ // True if we're waiting for the TemplateURLService to finish loading.
+ scoped_ptr<TemplateURLService::Subscription> template_service_subscription_;
+
// Have we installed a listener on the bookmark model?
bool installed_bookmark_observer_;
// True if source profile is readable.
bool is_source_readable_;
- // Receives notification when the TemplateURLService has loaded.
- content::NotificationRegistrar registrar_;
-
// Writes data from the importer back to the profile.
scoped_refptr<ProfileWriter> writer_;

Powered by Google App Engine
This is Rietveld 408576698