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

Side by Side Diff: components/sync/driver/model_type_controller.h

Issue 2949923004: Reland: [Sync] Record sync memory usage in histogram broken by datatypes (Closed)
Patch Set: Fix linker error Created 3 years, 6 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_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_
6 #define COMPONENTS_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_ 6 #define COMPONENTS_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void RegisterWithBackend(base::Callback<void(bool)> set_downloaded, 43 void RegisterWithBackend(base::Callback<void(bool)> set_downloaded,
44 ModelTypeConfigurer* configurer) override; 44 ModelTypeConfigurer* configurer) override;
45 void StartAssociating(const StartCallback& start_callback) override; 45 void StartAssociating(const StartCallback& start_callback) override;
46 void ActivateDataType(ModelTypeConfigurer* configurer) override; 46 void ActivateDataType(ModelTypeConfigurer* configurer) override;
47 void DeactivateDataType(ModelTypeConfigurer* configurer) override; 47 void DeactivateDataType(ModelTypeConfigurer* configurer) override;
48 void Stop() override; 48 void Stop() override;
49 std::string name() const override; 49 std::string name() const override;
50 State state() const override; 50 State state() const override;
51 void GetAllNodes(const AllNodesCallback& callback) override; 51 void GetAllNodes(const AllNodesCallback& callback) override;
52 void GetStatusCounters(const StatusCountersCallback& callback) override; 52 void GetStatusCounters(const StatusCountersCallback& callback) override;
53 void RecordMemoryUsageHistogram() override;
53 54
54 private: 55 private:
55 void RecordStartFailure(ConfigureResult result) const; 56 void RecordStartFailure(ConfigureResult result) const;
56 void ReportModelError(const ModelError& error); 57 void ReportModelError(const ModelError& error);
57 58
58 // If the DataType controller is waiting for models to load, once the models 59 // If the DataType controller is waiting for models to load, once the models
59 // are loaded this function should be called to let the base class 60 // are loaded this function should be called to let the base class
60 // implementation know that it is safe to continue with the activation. 61 // implementation know that it is safe to continue with the activation.
61 // The error indicates whether the loading completed successfully. 62 // The error indicates whether the loading completed successfully.
62 void LoadModelsDone(ConfigureResult result, const SyncError& error); 63 void LoadModelsDone(ConfigureResult result, const SyncError& error);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // something the first time after the type is enabled. 101 // something the first time after the type is enabled.
101 // TODO(crbug.com/647505): Remove this once the DTM handles things better. 102 // TODO(crbug.com/647505): Remove this once the DTM handles things better.
102 bool activated_ = false; 103 bool activated_ = false;
103 104
104 DISALLOW_COPY_AND_ASSIGN(ModelTypeController); 105 DISALLOW_COPY_AND_ASSIGN(ModelTypeController);
105 }; 106 };
106 107
107 } // namespace syncer 108 } // namespace syncer
108 109
109 #endif // COMPONENTS_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_ 110 #endif // COMPONENTS_SYNC_DRIVER_MODEL_TYPE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/sync/driver/directory_data_type_controller.cc ('k') | components/sync/driver/model_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698