Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: components/browser_sync/profile_sync_service_unittest.cc

Issue 2710623003: [sync] Clean up path generation for the local sync database. (Closed)
Patch Set: Fix non-windows bots. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/base/sync_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_sync/profile_sync_service.h" 5 #include "components/browser_sync/profile_sync_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 void CreateServiceWithLocalSyncBackend() { 216 void CreateServiceWithLocalSyncBackend() {
217 component_factory_ = profile_sync_service_bundle_.component_factory(); 217 component_factory_ = profile_sync_service_bundle_.component_factory();
218 ProfileSyncServiceBundle::SyncClientBuilder builder( 218 ProfileSyncServiceBundle::SyncClientBuilder builder(
219 &profile_sync_service_bundle_); 219 &profile_sync_service_bundle_);
220 ProfileSyncService::InitParams init_params = 220 ProfileSyncService::InitParams init_params =
221 profile_sync_service_bundle_.CreateBasicInitParams( 221 profile_sync_service_bundle_.CreateBasicInitParams(
222 ProfileSyncService::AUTO_START, builder.Build()); 222 ProfileSyncService::AUTO_START, builder.Build());
223 223
224 prefs()->SetBoolean(syncer::prefs::kEnableLocalSyncBackend, true); 224 prefs()->SetBoolean(syncer::prefs::kEnableLocalSyncBackend, true);
225 init_params.local_sync_backend_folder =
226 base::FilePath(FILE_PATH_LITERAL("dummyPath"));
227 init_params.oauth2_token_service = nullptr; 225 init_params.oauth2_token_service = nullptr;
228 init_params.gaia_cookie_manager_service = nullptr; 226 init_params.gaia_cookie_manager_service = nullptr;
229 227
230 service_ = base::MakeUnique<ProfileSyncService>(std::move(init_params)); 228 service_ = base::MakeUnique<ProfileSyncService>(std::move(init_params));
231 service_->RegisterDataTypeController( 229 service_->RegisterDataTypeController(
232 base::MakeUnique<syncer::FakeDataTypeController>(syncer::BOOKMARKS)); 230 base::MakeUnique<syncer::FakeDataTypeController>(syncer::BOOKMARKS));
233 } 231 }
234 232
235 void ShutdownAndDeleteService() { 233 void ShutdownAndDeleteService() {
236 if (service_) 234 if (service_)
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 // Progress the controller to RUNNING first, which is how the service 966 // Progress the controller to RUNNING first, which is how the service
969 // determines whether a type is enabled. 967 // determines whether a type is enabled.
970 controller->StartAssociating(base::Bind(&DoNothing)); 968 controller->StartAssociating(base::Bind(&DoNothing));
971 controller->FinishStart(DataTypeController::OK_FIRST_RUN); 969 controller->FinishStart(DataTypeController::OK_FIRST_RUN);
972 service()->RegisterDataTypeController(std::move(controller)); 970 service()->RegisterDataTypeController(std::move(controller));
973 EXPECT_NE(nullptr, service()->GetOpenTabsUIDelegate()); 971 EXPECT_NE(nullptr, service()->GetOpenTabsUIDelegate());
974 } 972 }
975 973
976 } // namespace 974 } // namespace
977 } // namespace browser_sync 975 } // namespace browser_sync
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service.cc ('k') | components/sync/base/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698