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

Side by Side Diff: chrome/browser/sync/glue/model_association_manager.h

Issue 10689178: Merge 144583 - sync: fix reentrancy crash in ModelAssociationManager (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__ 6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // This is used for TESTING PURPOSE ONLY. The test case can inspect 74 // This is used for TESTING PURPOSE ONLY. The test case can inspect
75 // and modify the timer. 75 // and modify the timer.
76 // TODO(sync) : This would go away if we made this class be able to do 76 // TODO(sync) : This would go away if we made this class be able to do
77 // Dependency injection. crbug.com/129212. 77 // Dependency injection. crbug.com/129212.
78 base::OneShotTimer<ModelAssociationManager>* GetTimerForTesting(); 78 base::OneShotTimer<ModelAssociationManager>* GetTimerForTesting();
79 79
80 private: 80 private:
81 enum State { 81 enum State {
82 // This is the state after |Initialize| is called. 82 // This is the state after |Initialize| is called.
83 INITIAILIZED_TO_CONFIGURE, 83 INITIALIZED_TO_CONFIGURE,
84 // Starting a new configuration. 84 // Starting a new configuration.
85 CONFIGURING, 85 CONFIGURING,
86 // A stop command was issued. 86 // A stop command was issued.
87 ABORTED, 87 ABORTED,
88 // No configuration is in progress. 88 // No configuration is in progress.
89 IDLE 89 IDLE
90 }; 90 };
91 91
92 // Returns true if any requested types currently need to start model 92 // Returns true if any requested types currently need to start model
93 // association. If non-null, fills |needs_start| with all such controllers. 93 // association. If non-null, fills |needs_start| with all such controllers.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // Set of all registered controllers. 161 // Set of all registered controllers.
162 const DataTypeController::TypeMap* controllers_; 162 const DataTypeController::TypeMap* controllers_;
163 ModelAssociationResultProcessor* result_processor_; 163 ModelAssociationResultProcessor* result_processor_;
164 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_; 164 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_;
165 base::OneShotTimer<ModelAssociationManager> timer_; 165 base::OneShotTimer<ModelAssociationManager> timer_;
166 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager); 166 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager);
167 }; 167 };
168 } // namespace browser_sync 168 } // namespace browser_sync
169 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__ 169 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATION_MANAGER_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/fake_data_type_controller.cc ('k') | chrome/browser/sync/glue/model_association_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698