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

Unified Diff: components/history/core/browser/history_model_worker.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « components/history/core/browser/history_model_worker.h ('k') | components/infobars/core/infobar_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/history_model_worker.cc
diff --git a/components/history/core/browser/history_model_worker.cc b/components/history/core/browser/history_model_worker.cc
index 0ab9cfa3a2f5e79c31b38bdb53a2c289310b34a5..54828f28340223698cc011a0904b690cd52d395c 100644
--- a/components/history/core/browser/history_model_worker.cc
+++ b/components/history/core/browser/history_model_worker.cc
@@ -6,9 +6,9 @@
#include <utility>
-#include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop.h"
#include "base/synchronization/waitable_event.h"
+#include "components/history/core/browser/history_db_task.h"
+#include "components/history/core/browser/history_service.h"
#include "components/sync/base/scoped_event_signal.h"
namespace browser_sync {
@@ -92,28 +92,13 @@ void PostWorkerTask(
HistoryModelWorker::HistoryModelWorker(
const base::WeakPtr<history::HistoryService>& history_service,
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- syncer::WorkerLoopDestructionObserver* observer)
- : syncer::ModelSafeWorker(observer),
- history_service_(history_service),
- ui_thread_(ui_thread) {
+ const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread)
+ : history_service_(history_service), ui_thread_(ui_thread) {
CHECK(history_service.get());
DCHECK(ui_thread_->BelongsToCurrentThread());
cancelable_tracker_.reset(new base::CancelableTaskTracker);
}
-void HistoryModelWorker::RegisterForLoopDestruction() {
- CHECK(history_service_.get());
- history_service_->ScheduleDBTask(
- std::unique_ptr<history::HistoryDBTask>(new AddDBThreadObserverTask(
- base::Bind(&HistoryModelWorker::RegisterOnDBThread, this))),
- cancelable_tracker_.get());
-}
-
-void HistoryModelWorker::RegisterOnDBThread() {
- SetWorkingLoopToCurrent();
-}
-
syncer::SyncerError HistoryModelWorker::DoWorkAndWaitUntilDoneImpl(
const syncer::WorkCallback& work) {
syncer::SyncerError error = syncer::UNSET;
« no previous file with comments | « components/history/core/browser/history_model_worker.h ('k') | components/infobars/core/infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698