| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 factory->SetLocalDeviceInfoProvider( | 188 factory->SetLocalDeviceInfoProvider( |
| 189 std::unique_ptr<sync_driver::LocalDeviceInfoProvider>( | 189 std::unique_ptr<sync_driver::LocalDeviceInfoProvider>( |
| 190 new sync_driver::LocalDeviceInfoProviderMock( | 190 new sync_driver::LocalDeviceInfoProviderMock( |
| 191 kSessionTags[0], "machine name", "Chromium 10k", "Chrome 10k", | 191 kSessionTags[0], "machine name", "Chromium 10k", "Chrome 10k", |
| 192 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, "device_id"))); | 192 sync_pb::SyncEnums_DeviceType_TYPE_LINUX, "device_id"))); |
| 193 | 193 |
| 194 Profile* profile = static_cast<Profile*>(context); | 194 Profile* profile = static_cast<Profile*>(context); |
| 195 ProfileSyncServiceMock* sync_service = | 195 ProfileSyncServiceMock* sync_service = |
| 196 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( | 196 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( |
| 197 base::WrapUnique(new browser_sync::ChromeSyncClient(profile)), | 197 base::MakeUnique<browser_sync::ChromeSyncClient>(profile), profile)); |
| 198 profile)); | |
| 199 static_cast<browser_sync::ChromeSyncClient*>(sync_service->GetSyncClient()) | 198 static_cast<browser_sync::ChromeSyncClient*>(sync_service->GetSyncClient()) |
| 200 ->SetSyncApiComponentFactoryForTesting(std::move(factory)); | 199 ->SetSyncApiComponentFactoryForTesting(std::move(factory)); |
| 201 return base::WrapUnique(sync_service); | 200 return base::WrapUnique(sync_service); |
| 202 } | 201 } |
| 203 | 202 |
| 204 void ExtensionSessionsTest::CreateTestProfileSyncService() { | 203 void ExtensionSessionsTest::CreateTestProfileSyncService() { |
| 205 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 204 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 206 base::FilePath path; | 205 base::FilePath path; |
| 207 PathService::Get(chrome::DIR_USER_DATA, &path); | 206 PathService::Get(chrome::DIR_USER_DATA, &path); |
| 208 path = path.AppendASCII("test_profile"); | 207 path = path.AppendASCII("test_profile"); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 EXPECT_EQ(0u, sessions->GetSize()); | 376 EXPECT_EQ(0u, sessions->GetSize()); |
| 378 } | 377 } |
| 379 | 378 |
| 380 // http://crbug.com/251199 | 379 // http://crbug.com/251199 |
| 381 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) { | 380 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_SessionsApis) { |
| 382 ASSERT_TRUE(RunExtensionSubtest("sessions", | 381 ASSERT_TRUE(RunExtensionSubtest("sessions", |
| 383 "sessions.html")) << message_; | 382 "sessions.html")) << message_; |
| 384 } | 383 } |
| 385 | 384 |
| 386 } // namespace extensions | 385 } // namespace extensions |
| OLD | NEW |