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_driver/data_type_manager_impl.h" | 5 #include "components/sync_driver/data_type_manager_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/profiler/scoped_tracker.h" | 16 #include "base/profiler/scoped_tracker.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
| 19 #include "components/sync/core/data_type_debug_info_listener.h" |
19 #include "components/sync_driver/data_type_encryption_handler.h" | 20 #include "components/sync_driver/data_type_encryption_handler.h" |
20 #include "components/sync_driver/data_type_manager_observer.h" | 21 #include "components/sync_driver/data_type_manager_observer.h" |
21 #include "components/sync_driver/data_type_status_table.h" | 22 #include "components/sync_driver/data_type_status_table.h" |
22 #include "sync/internal_api/public/data_type_debug_info_listener.h" | |
23 | 23 |
24 namespace sync_driver { | 24 namespace sync_driver { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 DataTypeStatusTable::TypeErrorMap | 28 DataTypeStatusTable::TypeErrorMap |
29 GenerateCryptoErrorsForTypes(syncer::ModelTypeSet encrypted_types) { | 29 GenerateCryptoErrorsForTypes(syncer::ModelTypeSet encrypted_types) { |
30 DataTypeStatusTable::TypeErrorMap crypto_errors; | 30 DataTypeStatusTable::TypeErrorMap crypto_errors; |
31 for (syncer::ModelTypeSet::Iterator iter = encrypted_types.First(); | 31 for (syncer::ModelTypeSet::Iterator iter = encrypted_types.First(); |
32 iter.Good(); iter.Inc()) { | 32 iter.Good(); iter.Inc()) { |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 DataTypeManager::State DataTypeManagerImpl::state() const { | 701 DataTypeManager::State DataTypeManagerImpl::state() const { |
702 return state_; | 702 return state_; |
703 } | 703 } |
704 | 704 |
705 void DataTypeManagerImpl::AddToConfigureTime() { | 705 void DataTypeManagerImpl::AddToConfigureTime() { |
706 DCHECK(!last_restart_time_.is_null()); | 706 DCHECK(!last_restart_time_.is_null()); |
707 configure_time_delta_ += (base::Time::Now() - last_restart_time_); | 707 configure_time_delta_ += (base::Time::Now() - last_restart_time_); |
708 } | 708 } |
709 | 709 |
710 } // namespace sync_driver | 710 } // namespace sync_driver |
OLD | NEW |