| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef COMPONENTS_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ |
| 6 #define COMPONENTS_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ | 6 #define COMPONENTS_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "components/sync/driver/data_type_controller.h" | 10 #include "components/sync/driver/data_type_controller.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void ActivateDataType(ModelTypeConfigurer* configurer) override; | 42 void ActivateDataType(ModelTypeConfigurer* configurer) override; |
| 43 | 43 |
| 44 // Directory specific implementation of DeactivateDataType. | 44 // Directory specific implementation of DeactivateDataType. |
| 45 // Deactivates change processing on the controlled data type (by removing | 45 // Deactivates change processing on the controlled data type (by removing |
| 46 // the data type's ChangeProcessor registration with the backend). | 46 // the data type's ChangeProcessor registration with the backend). |
| 47 // See ModelTypeConfigurer::DeactivateDataType for more details. | 47 // See ModelTypeConfigurer::DeactivateDataType for more details. |
| 48 void DeactivateDataType(ModelTypeConfigurer* configurer) override; | 48 void DeactivateDataType(ModelTypeConfigurer* configurer) override; |
| 49 | 49 |
| 50 void GetAllNodes(const AllNodesCallback& callback) override; | 50 void GetAllNodes(const AllNodesCallback& callback) override; |
| 51 void GetStatusCounters(const StatusCountersCallback& callback) override; | 51 void GetStatusCounters(const StatusCountersCallback& callback) override; |
| 52 void RecordMemoryUsageHistogram() override; |
| 52 | 53 |
| 53 // Returns a ListValue representing all nodes for a specified type by querying | 54 // Returns a ListValue representing all nodes for a specified type by querying |
| 54 // the directory. | 55 // the directory. |
| 55 static std::unique_ptr<base::ListValue> GetAllNodesForTypeFromDirectory( | 56 static std::unique_ptr<base::ListValue> GetAllNodesForTypeFromDirectory( |
| 56 ModelType type, | 57 ModelType type, |
| 57 syncable::Directory* directory); | 58 syncable::Directory* directory); |
| 58 | 59 |
| 59 protected: | 60 protected: |
| 60 // |dump_stack| is called when an unrecoverable error occurs. | 61 // |dump_stack| is called when an unrecoverable error occurs. |
| 61 DirectoryDataTypeController(ModelType type, | 62 DirectoryDataTypeController(ModelType type, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 78 private: | 79 private: |
| 79 // The model safe group of this data type. This should reflect the | 80 // The model safe group of this data type. This should reflect the |
| 80 // thread that should be used to modify the data type's native | 81 // thread that should be used to modify the data type's native |
| 81 // model. | 82 // model. |
| 82 ModelSafeGroup model_safe_group_; | 83 ModelSafeGroup model_safe_group_; |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 } // namespace syncer | 86 } // namespace syncer |
| 86 | 87 |
| 87 #endif // COMPONENTS_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ | 88 #endif // COMPONENTS_SYNC_DRIVER_DIRECTORY_DATA_TYPE_CONTROLLER_H__ |
| OLD | NEW |