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

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

Issue 535683002: Fix use-after-free in HDDDTC shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/history_delete_directives_data_type_controller.h
diff --git a/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h b/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..7b7fbff4525da5c25ff4f6a54d5a00440dcf96eb
--- /dev/null
+++ b/chrome/browser/sync/glue/history_delete_directives_data_type_controller.h
@@ -0,0 +1,50 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_GLUE_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONTROLLER_H_
+#define CHROME_BROWSER_SYNC_GLUE_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONTROLLER_H_
+
+#include "chrome/browser/sync/glue/local_device_info_provider.h"
+#include "chrome/browser/sync/profile_sync_service_observer.h"
+#include "components/sync_driver/ui_data_type_controller.h"
+
+class Profile;
+class ProfileSyncService;
+
+namespace browser_sync {
+
+// A controller for delete directives, which cannot sync when full encryption
+// is enabled.
+class HistoryDeleteDirectivesDataTypeController
+ : public sync_driver::UIDataTypeController,
+ public ProfileSyncServiceObserver {
+ public:
+ HistoryDeleteDirectivesDataTypeController(
+ sync_driver::SyncApiComponentFactory* factory,
+ ProfileSyncService* sync_service);
+
+ // UIDataTypeController override.
+ virtual bool ReadyForStart() const OVERRIDE;
+ virtual bool StartModels() OVERRIDE;
+ virtual void StopModels() OVERRIDE;
+
+ // ProfileSyncServiceBaseObserver implementation.
+ virtual void OnStateChanged() OVERRIDE;
+
+ private:
+ // Refcounted.
+ virtual ~HistoryDeleteDirectivesDataTypeController();
+
+ // Triggers a SingleDataTypeUnrecoverable error and returns true if the
+ // type is no longer ready, else does nothing and returns false.
+ bool DisableTypeIfNecessary();
+
+ ProfileSyncService* sync_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesDataTypeController);
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_GLUE_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONTROLLER_H_
« no previous file with comments | « no previous file | chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698