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

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

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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: components/history/core/browser/typed_url_data_type_controller.h
diff --git a/components/history/core/browser/typed_url_data_type_controller.h b/components/history/core/browser/typed_url_data_type_controller.h
index 92dd02760aee14d398b3dad37b179a8a625d5a8d..057737cf659acb131ed097a018dce6100018c9e8 100644
--- a/components/history/core/browser/typed_url_data_type_controller.h
+++ b/components/history/core/browser/typed_url_data_type_controller.h
@@ -9,7 +9,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/sync/driver/non_ui_data_type_controller.h"
@@ -26,35 +25,27 @@ class ControlTask;
// A class that manages the startup and shutdown of typed_url sync.
class TypedUrlDataTypeController : public sync_driver::NonUIDataTypeController {
public:
- explicit TypedUrlDataTypeController(
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- const base::Closure& error_callback,
- sync_driver::SyncClient* sync_client,
- const char* history_disabled_pref_name);
+ // |dump_stack| is called when an unrecoverable error occurs.
+ TypedUrlDataTypeController(const base::Closure& dump_stack,
+ sync_driver::SyncClient* sync_client,
+ const char* history_disabled_pref_name);
+ ~TypedUrlDataTypeController() override;
// NonUIDataTypeController implementation
- syncer::ModelType type() const override;
syncer::ModelSafeGroup model_safe_group() const override;
bool ReadyForStart() const override;
- // Invoked on the history thread to set our history backend - must be called
- // before CreateSyncComponents() is invoked.
- void SetBackend(history::HistoryBackend* backend);
-
protected:
// NonUIDataTypeController interface.
bool PostTaskOnBackendThread(const tracked_objects::Location& from_here,
const base::Closure& task) override;
private:
- ~TypedUrlDataTypeController() override;
-
void OnSavingBrowserHistoryDisabledChanged();
// Name of the pref that indicates whether saving history is disabled.
const char* history_disabled_pref_name_;
- history::HistoryBackend* backend_;
PrefChangeRegistrar pref_registrar_;
// Helper object to make sure we don't leave tasks running on the history

Powered by Google App Engine
This is Rietveld 408576698