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

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

Issue 2511703004: [Sync] Remove UIDataTypeController (Closed)
Patch Set: Rebase. 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
Index: components/history/core/browser/typed_url_data_type_controller.cc
diff --git a/components/history/core/browser/typed_url_data_type_controller.cc b/components/history/core/browser/typed_url_data_type_controller.cc
index 8e99a0032b143d6702506f8b35afa093d72e1c90..69424586ed9e339359ecfac7cdabd430df218a16 100644
--- a/components/history/core/browser/typed_url_data_type_controller.cc
+++ b/components/history/core/browser/typed_url_data_type_controller.cc
@@ -51,7 +51,11 @@ TypedUrlDataTypeController::TypedUrlDataTypeController(
const base::Closure& dump_stack,
syncer::SyncClient* sync_client,
const char* history_disabled_pref_name)
- : NonUIDataTypeController(syncer::TYPED_URLS, dump_stack, sync_client),
+ : NonUIDataTypeController(syncer::TYPED_URLS,
+ dump_stack,
+ sync_client,
+ syncer::GROUP_HISTORY,
+ nullptr),
history_disabled_pref_name_(history_disabled_pref_name),
sync_client_(sync_client) {
pref_registrar_.Init(sync_client->GetPrefService());
@@ -62,10 +66,6 @@ TypedUrlDataTypeController::TypedUrlDataTypeController(
base::AsWeakPtr(this)));
}
-syncer::ModelSafeGroup TypedUrlDataTypeController::model_safe_group() const {
- return syncer::GROUP_HISTORY;
-}
-
bool TypedUrlDataTypeController::ReadyForStart() const {
DCHECK(CalledOnValidThread());
return !sync_client_->GetPrefService()->GetBoolean(
@@ -79,7 +79,7 @@ void TypedUrlDataTypeController::OnSavingBrowserHistoryDisabledChanged() {
// generate an unrecoverable error. This can be fixed by restarting
// Chrome (on restart, typed urls will not be a registered type).
if (state() != NOT_RUNNING && state() != STOPPING) {
- PostTaskOnBackendThread(
+ PostTaskOnModelThread(
FROM_HERE,
base::Bind(&syncer::DataTypeErrorHandler::OnUnrecoverableError,
base::Passed(CreateErrorHandler()),
@@ -90,7 +90,7 @@ void TypedUrlDataTypeController::OnSavingBrowserHistoryDisabledChanged() {
}
}
-bool TypedUrlDataTypeController::PostTaskOnBackendThread(
+bool TypedUrlDataTypeController::PostTaskOnModelThread(
const tracked_objects::Location& from_here,
const base::Closure& task) {
DCHECK(CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698