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

Side by Side Diff: components/sync_driver/model_association_manager.h

Issue 1380693004: [Sync] Fixing sync_driver lint violations and adding PRESUBMIT lint check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cross
Patch Set: Removing lint fixes for revisit files, removing revisit patch dep. Created 5 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_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 5 #ifndef COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // |types_to_associate| should be subset of |desired_types| in Initialize(). 79 // |types_to_associate| should be subset of |desired_types| in Initialize().
80 // When this is completed, |OnModelAssociationDone| will be invoked. 80 // When this is completed, |OnModelAssociationDone| will be invoked.
81 void StartAssociationAsync(const syncer::ModelTypeSet& types_to_associate); 81 void StartAssociationAsync(const syncer::ModelTypeSet& types_to_associate);
82 82
83 // This is used for TESTING PURPOSE ONLY. The test case can inspect 83 // This is used for TESTING PURPOSE ONLY. The test case can inspect
84 // and modify the timer. 84 // and modify the timer.
85 // TODO(sync) : This would go away if we made this class be able to do 85 // TODO(sync) : This would go away if we made this class be able to do
86 // Dependency injection. crbug.com/129212. 86 // Dependency injection. crbug.com/129212.
87 base::OneShotTimer* GetTimerForTesting(); 87 base::OneShotTimer* GetTimerForTesting();
88 88
89 State state() const { return state_; } 89 State state() const { return state_; }
90 90
91 private: 91 private:
92 // Called at the end of association to reset state to prepare for next 92 // Called at the end of association to reset state to prepare for next
93 // round of association. 93 // round of association.
94 void ResetForNextAssociation(); 94 void ResetForNextAssociation();
95 95
96 // Called by Initialize() to stop types that are not in |desired_types_|. 96 // Called by Initialize() to stop types that are not in |desired_types_|.
97 void StopDisabledTypes(); 97 void StopDisabledTypes();
98 98
99 // Start loading non-running types that are in |desired_types_|. 99 // Start loading non-running types that are in |desired_types_|.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 DataTypeManager::ConfigureStatus configure_status_; 154 DataTypeManager::ConfigureStatus configure_status_;
155 155
156 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_; 156 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager); 158 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager);
159 }; 159 };
160 160
161 } // namespace sync_driver 161 } // namespace sync_driver
162 162
163 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 163 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698