Refactor sending NOTIFICATION_HISTORY_URL_VISITED
commitc8eb77ed61f9c44efac034bd6bd3a0a6ba553cfb
authorsdefresne <sdefresne@chromium.org>
Wed, 15 Oct 2014 18:15:44 +0000 (15 11:15 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 15 Oct 2014 18:16:12 +0000 (15 18:16 +0000)
tree67c05e2572a4587a7999754d910cfa1dc806b315
parent573743f8ee7b2a4ebd4ce230525244911b44a0f1
Refactor sending NOTIFICATION_HISTORY_URL_VISITED

Refactor //chrome/browser/history code sending the notification
NOTIFICATION_HISTORY_URL_VISITED so that the notification is not
send from the core of the component.

Introduce HistoryServiceObserver to follow the observer pattern
instead of notification and use this pattern in the core history
code.

Introduce HistoryBackendObserver to follow the observer pattern
instead of notification in the history thread.

ChromeHistoryClient forward the HistoryServiceObserver events to
the notification system so that porting the clients can be on a
case by case basis and does not block the componentization work.

BUG=373326

Review URL: https://codereview.chromium.org/631253002

Cr-Commit-Position: refs/heads/master@{#299719}
26 files changed:
chrome/browser/history/android/android_provider_backend_unittest.cc
chrome/browser/history/chrome_history_client.cc
chrome/browser/history/chrome_history_client.h
chrome/browser/history/chrome_history_client_factory.cc
chrome/browser/history/chrome_history_client_factory.h
chrome/browser/history/history_backend.cc
chrome/browser/history/history_backend.h
chrome/browser/history/history_backend_unittest.cc
chrome/browser/history/history_service.cc
chrome/browser/history/history_service.h
chrome/browser/history/history_service_factory.cc
chrome/browser/history/history_unittest.cc
chrome/browser/history/in_memory_history_backend.cc
chrome/browser/history/in_memory_history_backend.h
chrome/browser/history/in_memory_url_index.cc
chrome/browser/history/in_memory_url_index.h
chrome/browser/history/in_memory_url_index_unittest.cc
chrome/browser/sync/glue/typed_url_change_processor.cc
chrome/browser/sync/glue/typed_url_change_processor.h
chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
chrome/test/base/testing_profile.cc
components/history.gypi
components/history/core/browser/BUILD.gn
components/history/core/browser/history_backend_observer.h [new file with mode: 0644]
components/history/core/browser/history_service_observer.h
components/search_engines/template_url_service_unittest.cc