| 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 "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "chrome/browser/sessions/session_tab_helper.h" | 8 #include "chrome/browser/sessions/session_tab_helper.h" |
| 9 #include "chrome/browser/sync/chrome_sync_client.h" | 9 #include "chrome/browser/sync/chrome_sync_client.h" |
| 10 #include "chrome/browser/sync/glue/session_sync_test_helper.h" | 10 #include "chrome/browser/sync/glue/session_sync_test_helper.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 "cache_guid", | 270 "cache_guid", |
| 271 "Wayne Gretzky's Hacking Box", | 271 "Wayne Gretzky's Hacking Box", |
| 272 "Chromium 10k", | 272 "Chromium 10k", |
| 273 "Chrome 10k", | 273 "Chrome 10k", |
| 274 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, | 274 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, |
| 275 "device_id")); | 275 "device_id")); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void SetUp() override { | 278 void SetUp() override { |
| 279 BrowserWithTestWindowTest::SetUp(); | 279 BrowserWithTestWindowTest::SetUp(); |
| 280 sync_client_.reset(new browser_sync::ChromeSyncClient(profile())); | 280 sync_client_.reset(new browser_sync::ChromeSyncClient(profile(), nullptr)); |
| 281 browser_sync::NotificationServiceSessionsRouter* router( | 281 browser_sync::NotificationServiceSessionsRouter* router( |
| 282 new browser_sync::NotificationServiceSessionsRouter( | 282 new browser_sync::NotificationServiceSessionsRouter( |
| 283 profile(), GetSyncSessionsClient(), | 283 profile(), GetSyncSessionsClient(), |
| 284 syncer::SyncableService::StartSyncFlare())); | 284 syncer::SyncableService::StartSyncFlare())); |
| 285 sync_prefs_.reset(new sync_driver::SyncPrefs(profile()->GetPrefs())); | 285 sync_prefs_.reset(new sync_driver::SyncPrefs(profile()->GetPrefs())); |
| 286 manager_.reset(new SessionsSyncManager( | 286 manager_.reset(new SessionsSyncManager( |
| 287 GetSyncSessionsClient(), sync_prefs_.get(), local_device_.get(), | 287 GetSyncSessionsClient(), sync_prefs_.get(), local_device_.get(), |
| 288 scoped_ptr<LocalSessionEventRouter>(router), | 288 scoped_ptr<LocalSessionEventRouter>(router), |
| 289 base::Bind(&SessionNotificationObserver::NotifyOfUpdate, | 289 base::Bind(&SessionNotificationObserver::NotifyOfUpdate, |
| 290 base::Unretained(&observer_)), | 290 base::Unretained(&observer_)), |
| (...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 base::Time last_time; | 2254 base::Time last_time; |
| 2255 for (size_t i = 0; i < tabs.size(); ++i) { | 2255 for (size_t i = 0; i < tabs.size(); ++i) { |
| 2256 base::Time this_time = tabs[i]->timestamp; | 2256 base::Time this_time = tabs[i]->timestamp; |
| 2257 if (i > 0) | 2257 if (i > 0) |
| 2258 ASSERT_GE(last_time, this_time); | 2258 ASSERT_GE(last_time, this_time); |
| 2259 last_time = tabs[i]->timestamp; | 2259 last_time = tabs[i]->timestamp; |
| 2260 } | 2260 } |
| 2261 } | 2261 } |
| 2262 | 2262 |
| 2263 } // namespace browser_sync | 2263 } // namespace browser_sync |
| OLD | NEW |