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 "chrome/browser/sync/sessions/sessions_sync_manager.h" | 5 #include "chrome/browser/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/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/sessions/session_tab_helper.h" | 9 #include "chrome/browser/sessions/session_tab_helper.h" |
10 #include "chrome/browser/sessions/session_types.h" | 10 #include "chrome/browser/sessions/session_types.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 : test_processor_(NULL) { | 224 : test_processor_(NULL) { |
225 local_device_.reset(new LocalDeviceInfoProviderMock( | 225 local_device_.reset(new LocalDeviceInfoProviderMock( |
226 "cache_guid", | 226 "cache_guid", |
227 "Wayne Gretzky's Hacking Box", | 227 "Wayne Gretzky's Hacking Box", |
228 "Chromium 10k", | 228 "Chromium 10k", |
229 "Chrome 10k", | 229 "Chrome 10k", |
230 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, | 230 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, |
231 "device_id")); | 231 "device_id")); |
232 } | 232 } |
233 | 233 |
234 virtual void SetUp() override { | 234 void SetUp() override { |
235 BrowserWithTestWindowTest::SetUp(); | 235 BrowserWithTestWindowTest::SetUp(); |
236 browser_sync::NotificationServiceSessionsRouter* router( | 236 browser_sync::NotificationServiceSessionsRouter* router( |
237 new browser_sync::NotificationServiceSessionsRouter( | 237 new browser_sync::NotificationServiceSessionsRouter( |
238 profile(), syncer::SyncableService::StartSyncFlare())); | 238 profile(), syncer::SyncableService::StartSyncFlare())); |
239 manager_.reset(new SessionsSyncManager(profile(), local_device_.get(), | 239 manager_.reset(new SessionsSyncManager(profile(), local_device_.get(), |
240 scoped_ptr<LocalSessionEventRouter>(router))); | 240 scoped_ptr<LocalSessionEventRouter>(router))); |
241 } | 241 } |
242 | 242 |
243 virtual void TearDown() override { | 243 void TearDown() override { |
244 test_processor_ = NULL; | 244 test_processor_ = NULL; |
245 helper()->Reset(); | 245 helper()->Reset(); |
246 manager_.reset(); | 246 manager_.reset(); |
247 BrowserWithTestWindowTest::TearDown(); | 247 BrowserWithTestWindowTest::TearDown(); |
248 } | 248 } |
249 | 249 |
250 const DeviceInfo* GetLocalDeviceInfo() { | 250 const DeviceInfo* GetLocalDeviceInfo() { |
251 return local_device_->GetLocalDeviceInfo(); | 251 return local_device_->GetLocalDeviceInfo(); |
252 } | 252 } |
253 | 253 |
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 base::Time(), | 1963 base::Time(), |
1964 syncer::AttachmentIdList(), | 1964 syncer::AttachmentIdList(), |
1965 syncer::AttachmentServiceProxyForTest::Create())); | 1965 syncer::AttachmentServiceProxyForTest::Create())); |
1966 } | 1966 } |
1967 | 1967 |
1968 syncer::SyncChangeList output; | 1968 syncer::SyncChangeList output; |
1969 InitWithSyncDataTakeOutput(initial_data, &output); | 1969 InitWithSyncDataTakeOutput(initial_data, &output); |
1970 } | 1970 } |
1971 | 1971 |
1972 } // namespace browser_sync | 1972 } // namespace browser_sync |
OLD | NEW |