| 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/get_updates_processor.h" | 5 #include "components/sync/engine_impl/get_updates_processor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 12 #include "components/sync/engine_impl/cycle/status_controller.h" | 12 #include "components/sync/engine_impl/cycle/status_controller.h" |
| 13 #include "components/sync/engine_impl/cycle/sync_cycle.h" | 13 #include "components/sync/engine_impl/cycle/sync_cycle.h" |
| 14 #include "components/sync/engine_impl/events/get_updates_response_event.h" | 14 #include "components/sync/engine_impl/events/get_updates_response_event.h" |
| 15 #include "components/sync/engine_impl/get_updates_delegate.h" | 15 #include "components/sync/engine_impl/get_updates_delegate.h" |
| 16 #include "components/sync/engine_impl/syncer_proto_util.h" | 16 #include "components/sync/engine_impl/syncer_proto_util.h" |
| 17 #include "components/sync/engine_impl/update_handler.h" | 17 #include "components/sync/engine_impl/update_handler.h" |
| 18 #include "components/sync/syncable/directory.h" | 18 #include "components/sync/syncable/directory.h" |
| 19 #include "components/sync/syncable/nigori_handler.h" | 19 #include "components/sync/syncable/nigori_handler.h" |
| 20 #include "components/sync/syncable/syncable_read_transaction.h" | 20 #include "components/sync/syncable/syncable_read_transaction.h" |
| 21 | 21 |
| 22 namespace syncer { | 22 namespace syncer { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; | 26 using SyncEntityList = std::vector<const sync_pb::SyncEntity*>; |
| 27 typedef std::map<ModelType, SyncEntityList> TypeSyncEntityMap; | 27 using TypeSyncEntityMap = std::map<ModelType, SyncEntityList>; |
| 28 typedef std::map<ModelType, size_t> TypeToIndexMap; | 28 using TypeToIndexMap = std::map<ModelType, size_t>; |
| 29 | 29 |
| 30 bool ShouldRequestEncryptionKey(SyncCycleContext* context) { | 30 bool ShouldRequestEncryptionKey(SyncCycleContext* context) { |
| 31 syncable::Directory* dir = context->directory(); | 31 syncable::Directory* dir = context->directory(); |
| 32 syncable::ReadTransaction trans(FROM_HERE, dir); | 32 syncable::ReadTransaction trans(FROM_HERE, dir); |
| 33 syncable::NigoriHandler* nigori_handler = dir->GetNigoriHandler(); | 33 syncable::NigoriHandler* nigori_handler = dir->GetNigoriHandler(); |
| 34 return nigori_handler->NeedKeystoreKey(&trans); | 34 return nigori_handler->NeedKeystoreKey(&trans); |
| 35 } | 35 } |
| 36 | 36 |
| 37 SyncerError HandleGetEncryptionKeyResponse( | 37 SyncerError HandleGetEncryptionKeyResponse( |
| 38 const sync_pb::ClientToServerResponse& update_response, | 38 const sync_pb::ClientToServerResponse& update_response, |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 } | 362 } |
| 363 | 363 |
| 364 void GetUpdatesProcessor::CopyClientDebugInfo( | 364 void GetUpdatesProcessor::CopyClientDebugInfo( |
| 365 DebugInfoGetter* debug_info_getter, | 365 DebugInfoGetter* debug_info_getter, |
| 366 sync_pb::DebugInfo* debug_info) { | 366 sync_pb::DebugInfo* debug_info) { |
| 367 DVLOG(1) << "Copying client debug info to send."; | 367 DVLOG(1) << "Copying client debug info to send."; |
| 368 debug_info_getter->GetDebugInfo(debug_info); | 368 debug_info_getter->GetDebugInfo(debug_info); |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace syncer | 371 } // namespace syncer |
| OLD | NEW |