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

Side by Side Diff: components/history/core/browser/history_delete_directives_data_type_controller.h

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONT ROLLER_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONT ROLLER_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONT ROLLER_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_CONT ROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/sync/device_info/local_device_info_provider.h" 9 #include "components/sync/device_info/local_device_info_provider.h"
10 #include "components/sync/driver/sync_service_observer.h" 10 #include "components/sync/driver/sync_service_observer.h"
11 #include "components/sync/driver/ui_data_type_controller.h" 11 #include "components/sync/driver/ui_data_type_controller.h"
12 12
13 namespace browser_sync { 13 namespace browser_sync {
14 14
15 // A controller for delete directives, which cannot sync when full encryption 15 // A controller for delete directives, which cannot sync when full encryption
16 // is enabled. 16 // is enabled.
17 class HistoryDeleteDirectivesDataTypeController 17 class HistoryDeleteDirectivesDataTypeController
18 : public sync_driver::UIDataTypeController, 18 : public syncer::UIDataTypeController,
19 public sync_driver::SyncServiceObserver { 19 public syncer::SyncServiceObserver {
20 public: 20 public:
21 // |dump_stack| is called when an unrecoverable error occurs. 21 // |dump_stack| is called when an unrecoverable error occurs.
22 HistoryDeleteDirectivesDataTypeController( 22 HistoryDeleteDirectivesDataTypeController(const base::Closure& dump_stack,
23 const base::Closure& dump_stack, 23 syncer::SyncClient* sync_client);
24 sync_driver::SyncClient* sync_client);
25 ~HistoryDeleteDirectivesDataTypeController() override; 24 ~HistoryDeleteDirectivesDataTypeController() override;
26 25
27 // UIDataTypeController override. 26 // UIDataTypeController override.
28 bool ReadyForStart() const override; 27 bool ReadyForStart() const override;
29 bool StartModels() override; 28 bool StartModels() override;
30 void StopModels() override; 29 void StopModels() override;
31 30
32 // sync_driver::SyncServiceObserver implementation. 31 // syncer::SyncServiceObserver implementation.
33 void OnStateChanged() override; 32 void OnStateChanged() override;
34 33
35 private: 34 private:
36 // Triggers a SingleDataTypeUnrecoverable error and returns true if the 35 // Triggers a SingleDataTypeUnrecoverable error and returns true if the
37 // type is no longer ready, else does nothing and returns false. 36 // type is no longer ready, else does nothing and returns false.
38 bool DisableTypeIfNecessary(); 37 bool DisableTypeIfNecessary();
39 38
40 sync_driver::SyncClient* sync_client_; 39 syncer::SyncClient* sync_client_;
41 40
42 DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesDataTypeController); 41 DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesDataTypeController);
43 }; 42 };
44 43
45 } // namespace browser_sync 44 } // namespace browser_sync
46 45
47 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_C ONTROLLER_H_ 46 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_C ONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698