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

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

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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 syncer::UIDataTypeController, 18 : public sync_driver::UIDataTypeController,
19 public syncer::SyncServiceObserver { 19 public sync_driver::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(const base::Closure& dump_stack, 22 HistoryDeleteDirectivesDataTypeController(
23 syncer::SyncClient* sync_client); 23 const base::Closure& dump_stack,
24 sync_driver::SyncClient* sync_client);
24 ~HistoryDeleteDirectivesDataTypeController() override; 25 ~HistoryDeleteDirectivesDataTypeController() override;
25 26
26 // UIDataTypeController override. 27 // UIDataTypeController override.
27 bool ReadyForStart() const override; 28 bool ReadyForStart() const override;
28 bool StartModels() override; 29 bool StartModels() override;
29 void StopModels() override; 30 void StopModels() override;
30 31
31 // syncer::SyncServiceObserver implementation. 32 // sync_driver::SyncServiceObserver implementation.
32 void OnStateChanged() override; 33 void OnStateChanged() override;
33 34
34 private: 35 private:
35 // Triggers a SingleDataTypeUnrecoverable error and returns true if the 36 // Triggers a SingleDataTypeUnrecoverable error and returns true if the
36 // type is no longer ready, else does nothing and returns false. 37 // type is no longer ready, else does nothing and returns false.
37 bool DisableTypeIfNecessary(); 38 bool DisableTypeIfNecessary();
38 39
39 syncer::SyncClient* sync_client_; 40 sync_driver::SyncClient* sync_client_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesDataTypeController); 42 DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesDataTypeController);
42 }; 43 };
43 44
44 } // namespace browser_sync 45 } // namespace browser_sync
45 46
46 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_C ONTROLLER_H_ 47 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DELETE_DIRECTIVES_DATA_TYPE_C ONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698