| 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_sessions/sessions_sync_manager.h" | 5 #include "components/sync_sessions/sessions_sync_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 session_tracker_(sessions_client), | 146 session_tracker_(sessions_client), |
| 147 favicon_cache_(sessions_client->GetFaviconService(), | 147 favicon_cache_(sessions_client->GetFaviconService(), |
| 148 sessions_client->GetHistoryService(), | 148 sessions_client->GetHistoryService(), |
| 149 kMaxSyncFavicons), | 149 kMaxSyncFavicons), |
| 150 local_tab_pool_out_of_sync_(true), | 150 local_tab_pool_out_of_sync_(true), |
| 151 sync_prefs_(sync_prefs), | 151 sync_prefs_(sync_prefs), |
| 152 local_device_(local_device), | 152 local_device_(local_device), |
| 153 current_device_type_(sync_pb::SyncEnums_DeviceType_TYPE_OTHER), | 153 current_device_type_(sync_pb::SyncEnums_DeviceType_TYPE_OTHER), |
| 154 local_session_header_node_id_(TabNodePool::kInvalidTabNodeID), | 154 local_session_header_node_id_(TabNodePool::kInvalidTabNodeID), |
| 155 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays), | 155 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays), |
| 156 local_event_router_(std::move(router)), | 156 local_event_router_(router), |
| 157 page_revisit_broadcaster_(this, sessions_client), | 157 page_revisit_broadcaster_(this, sessions_client), |
| 158 sessions_updated_callback_(sessions_updated_callback), | 158 sessions_updated_callback_(sessions_updated_callback), |
| 159 datatype_refresh_callback_(datatype_refresh_callback), | 159 datatype_refresh_callback_(datatype_refresh_callback), |
| 160 task_tracker_(base::MakeUnique<TaskTracker>()) {} | 160 task_tracker_(base::MakeUnique<TaskTracker>()) {} |
| 161 | 161 |
| 162 SessionsSyncManager::~SessionsSyncManager() {} | 162 SessionsSyncManager::~SessionsSyncManager() {} |
| 163 | 163 |
| 164 // Returns the GUID-based string that should be used for | 164 // Returns the GUID-based string that should be used for |
| 165 // |SessionsSyncManager::current_machine_tag_|. | 165 // |SessionsSyncManager::current_machine_tag_|. |
| 166 static std::string BuildMachineTag(const std::string& cache_guid) { | 166 static std::string BuildMachineTag(const std::string& cache_guid) { |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 } | 1287 } |
| 1288 | 1288 |
| 1289 // static | 1289 // static |
| 1290 std::string SessionsSyncManager::TagHashFromSpecifics( | 1290 std::string SessionsSyncManager::TagHashFromSpecifics( |
| 1291 const sync_pb::SessionSpecifics& specifics) { | 1291 const sync_pb::SessionSpecifics& specifics) { |
| 1292 return syncer::GenerateSyncableHash(syncer::SESSIONS, | 1292 return syncer::GenerateSyncableHash(syncer::SESSIONS, |
| 1293 TagFromSpecifics(specifics)); | 1293 TagFromSpecifics(specifics)); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 }; // namespace sync_sessions | 1296 }; // namespace sync_sessions |
| OLD | NEW |