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

Unified Diff: chrome/browser/sync/glue/typed_url_change_processor.h

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove NotificationObserver from InMemoryURLIndex Created 6 years 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/sync/glue/typed_url_change_processor.h
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.h b/chrome/browser/sync/glue/typed_url_change_processor.h
index 5431af5c8081977d348791a96195a305e305236b..267e952df6bb86e728af5bd8e282b258f3b87356 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.h
+++ b/chrome/browser/sync/glue/typed_url_change_processor.h
@@ -10,13 +10,11 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/typed_url_model_associator.h"
#include "components/history/core/browser/history_backend_observer.h"
#include "components/sync_driver/data_type_error_handler.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/notification_types.h"
class Profile;
@@ -24,10 +22,6 @@ namespace base {
class MessageLoop;
}
-namespace content {
-class NotificationService;
-}
-
namespace history {
class HistoryBackend;
struct URLsDeletedDetails;
@@ -43,7 +37,6 @@ class DataTypeErrorHandler;
// applying them to the sync API 'syncable' model, and vice versa. All
// operations and use of this class are from the UI thread.
class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor,
- public content::NotificationObserver,
public history::HistoryBackendObserver {
public:
TypedUrlChangeProcessor(Profile* profile,
@@ -52,12 +45,6 @@ class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor,
sync_driver::DataTypeErrorHandler* error_handler);
~TypedUrlChangeProcessor() override;
- // content::NotificationObserver implementation.
- // History -> sync API change application.
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
// history::HistoryBackendObserver:
void OnURLVisited(history::HistoryBackend* history_backend,
ui::PageTransition transition,
@@ -66,6 +53,9 @@ class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor,
base::Time visit_time) override;
void OnURLsModified(history::HistoryBackend* history_backend,
const history::URLRows& changed_urls) override;
+ void OnURLsDeleted(
+ history::HistoryBackend* history_backend,
+ const history::URLsDeletedDetails& deleted_details) override;
// sync API model -> WebDataService change application.
void ApplyChangesFromSyncModel(
@@ -114,10 +104,6 @@ class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor,
history::HistoryBackend* history_backend_;
base::MessageLoop* backend_loop_;
- content::NotificationRegistrar notification_registrar_;
-
- scoped_ptr<content::NotificationService> notification_service_;
-
// The set of pending changes that will be written out on the next
// CommitChangesFromSyncModel() call.
history::URLRows pending_new_urls_;
@@ -129,6 +115,9 @@ class TypedUrlChangeProcessor : public sync_driver::ChangeProcessor,
bool disconnected_;
base::Lock disconnect_lock_;
+ ScopedObserver<history::HistoryBackend, history::HistoryBackendObserver>
+ history_backend_observer_;
+
DISALLOW_COPY_AND_ASSIGN(TypedUrlChangeProcessor);
};

Powered by Google App Engine
This is Rietveld 408576698