| OLD | NEW |
| 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 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" | 5 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "components/sync/engine/cycle/status_counters.h" | 11 #include "components/sync/engine/cycle/status_counters.h" |
| 12 #include "components/sync/engine/cycle/type_debug_info_observer.h" | 12 #include "components/sync/engine/cycle/type_debug_info_observer.h" |
| 13 #include "components/sync/syncable/entry.h" | 13 #include "components/sync/syncable/entry.h" |
| 14 #include "components/sync/syncable/syncable_read_transaction.h" | 14 #include "components/sync/syncable/syncable_read_transaction.h" |
| 15 | 15 |
| 16 namespace syncer { | 16 namespace syncer { |
| 17 | 17 |
| 18 DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter( | 18 DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter( |
| 19 syncable::Directory* directory, | 19 syncable::Directory* directory, |
| 20 syncer::ModelType type, | 20 ModelType type, |
| 21 base::ObserverList<TypeDebugInfoObserver>* observers) | 21 base::ObserverList<TypeDebugInfoObserver>* observers) |
| 22 : directory_(directory), | 22 : directory_(directory), |
| 23 type_(type), | 23 type_(type), |
| 24 type_debug_info_observers_(observers) {} | 24 type_debug_info_observers_(observers) {} |
| 25 | 25 |
| 26 DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter( | 26 DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter( |
| 27 ModelType type, | 27 ModelType type, |
| 28 base::ObserverList<TypeDebugInfoObserver>* observers) | 28 base::ObserverList<TypeDebugInfoObserver>* observers) |
| 29 : directory_(NULL), type_(type), type_debug_info_observers_(observers) {} | 29 : directory_(NULL), type_(type), type_debug_info_observers_(observers) {} |
| 30 | 30 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (!e.GetIsDel()) { | 81 if (!e.GetIsDel()) { |
| 82 counters.num_entries++; | 82 counters.num_entries++; |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_), | 86 FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_), |
| 87 OnStatusCountersUpdated(type_, counters)); | 87 OnStatusCountersUpdated(type_, counters)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace syncer | 90 } // namespace syncer |
| OLD | NEW |