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

Side by Side Diff: chrome/browser/sync/profile_sync_test_util.cc

Issue 2489433002: [Sync] Move thread checking into the ModelSafeWorker interface. (Closed)
Patch Set: Improve/add comments. Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/profile_sync_test_util.h" 5 #include "chrome/browser/sync/profile_sync_test_util.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 init_params.oauth2_token_service = 48 init_params.oauth2_token_service =
49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
50 init_params.start_behavior = ProfileSyncService::MANUAL_START; 50 init_params.start_behavior = ProfileSyncService::MANUAL_START;
51 init_params.sync_client = std::move(sync_client); 51 init_params.sync_client = std::move(sync_client);
52 init_params.network_time_update_callback = 52 init_params.network_time_update_callback =
53 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); 53 base::Bind(&browser_sync::EmptyNetworkTimeUpdate);
54 init_params.base_directory = profile->GetPath(); 54 init_params.base_directory = profile->GetPath();
55 init_params.url_request_context = profile->GetRequestContext(); 55 init_params.url_request_context = profile->GetRequestContext();
56 init_params.debug_identifier = profile->GetDebugName(); 56 init_params.debug_identifier = profile->GetDebugName();
57 init_params.channel = chrome::GetChannel(); 57 init_params.channel = chrome::GetChannel();
58 init_params.db_thread = content::BrowserThread::GetTaskRunnerForThread(
59 content::BrowserThread::DB);
60 init_params.file_thread = content::BrowserThread::GetTaskRunnerForThread(
61 content::BrowserThread::FILE);
62 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); 58 init_params.blocking_pool = content::BrowserThread::GetBlockingPool();
63 59
64 return init_params; 60 return init_params;
65 } 61 }
66 62
67 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() { 63 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() {
68 auto profile = base::MakeUnique<TestingProfile>(); 64 auto profile = base::MakeUnique<TestingProfile>();
69 SigninManagerFactory::GetForProfile(profile.get()) 65 SigninManagerFactory::GetForProfile(profile.get())
70 ->SetAuthenticatedAccountInfo("12345", "foo"); 66 ->SetAuthenticatedAccountInfo("12345", "foo");
71 return profile; 67 return profile;
72 } 68 }
73 69
74 std::unique_ptr<KeyedService> BuildMockProfileSyncService( 70 std::unique_ptr<KeyedService> BuildMockProfileSyncService(
75 content::BrowserContext* context) { 71 content::BrowserContext* context) {
76 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( 72 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>(
77 CreateProfileSyncServiceParamsForTest( 73 CreateProfileSyncServiceParamsForTest(
78 Profile::FromBrowserContext(context))); 74 Profile::FromBrowserContext(context)));
79 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698