OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <map> | 10 #include <map> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 ProfileSyncService::InitParams::InitParams() = default; | 156 ProfileSyncService::InitParams::InitParams() = default; |
157 ProfileSyncService::InitParams::InitParams(InitParams&& other) = default; | 157 ProfileSyncService::InitParams::InitParams(InitParams&& other) = default; |
158 ProfileSyncService::InitParams::~InitParams() = default; | 158 ProfileSyncService::InitParams::~InitParams() = default; |
159 | 159 |
160 ProfileSyncService::ProfileSyncService(InitParams init_params) | 160 ProfileSyncService::ProfileSyncService(InitParams init_params) |
161 : SyncServiceBase(std::move(init_params.sync_client), | 161 : SyncServiceBase(std::move(init_params.sync_client), |
162 std::move(init_params.signin_wrapper), | 162 std::move(init_params.signin_wrapper), |
163 init_params.channel, | 163 init_params.channel, |
164 init_params.base_directory, | 164 init_params.base_directory, |
| 165 init_params.local_sync_backend_folder, |
165 init_params.debug_identifier), | 166 init_params.debug_identifier), |
166 OAuth2TokenService::Consumer("sync"), | 167 OAuth2TokenService::Consumer("sync"), |
167 last_auth_error_(AuthError::AuthErrorNone()), | 168 last_auth_error_(AuthError::AuthErrorNone()), |
168 sync_service_url_( | 169 sync_service_url_( |
169 syncer::GetSyncServiceURL(*base::CommandLine::ForCurrentProcess(), | 170 syncer::GetSyncServiceURL(*base::CommandLine::ForCurrentProcess(), |
170 init_params.channel)), | 171 init_params.channel)), |
171 network_time_update_callback_( | 172 network_time_update_callback_( |
172 std::move(init_params.network_time_update_callback)), | 173 std::move(init_params.network_time_update_callback)), |
173 url_request_context_(init_params.url_request_context), | 174 url_request_context_(init_params.url_request_context), |
174 blocking_task_runner_(std::move(init_params.blocking_task_runner)), | 175 blocking_task_runner_(std::move(init_params.blocking_task_runner)), |
175 is_first_time_sync_configure_(false), | 176 is_first_time_sync_configure_(false), |
176 engine_initialized_(false), | 177 engine_initialized_(false), |
177 sync_disabled_by_admin_(false), | 178 sync_disabled_by_admin_(false), |
178 is_auth_in_progress_(false), | 179 is_auth_in_progress_(false), |
179 local_sync_backend_folder_(init_params.local_sync_backend_folder), | |
180 unrecoverable_error_reason_(ERROR_REASON_UNSET), | 180 unrecoverable_error_reason_(ERROR_REASON_UNSET), |
181 expect_sync_configuration_aborted_(false), | 181 expect_sync_configuration_aborted_(false), |
182 configure_status_(DataTypeManager::UNKNOWN), | 182 configure_status_(DataTypeManager::UNKNOWN), |
183 oauth2_token_service_(init_params.oauth2_token_service), | 183 oauth2_token_service_(init_params.oauth2_token_service), |
184 request_access_token_backoff_(&kRequestAccessTokenBackoffPolicy), | 184 request_access_token_backoff_(&kRequestAccessTokenBackoffPolicy), |
185 connection_status_(syncer::CONNECTION_NOT_ATTEMPTED), | 185 connection_status_(syncer::CONNECTION_NOT_ATTEMPTED), |
186 last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()), | 186 last_get_token_error_(GoogleServiceAuthError::AuthErrorNone()), |
187 gaia_cookie_manager_service_(init_params.gaia_cookie_manager_service), | 187 gaia_cookie_manager_service_(init_params.gaia_cookie_manager_service), |
188 network_resources_(new syncer::HttpBridgeNetworkResources), | 188 network_resources_(new syncer::HttpBridgeNetworkResources), |
189 start_behavior_(init_params.start_behavior), | 189 start_behavior_(init_params.start_behavior), |
(...skipping 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 | 2420 |
2421 DCHECK(startup_controller_->IsSetupInProgress()); | 2421 DCHECK(startup_controller_->IsSetupInProgress()); |
2422 startup_controller_->SetSetupInProgress(false); | 2422 startup_controller_->SetSetupInProgress(false); |
2423 | 2423 |
2424 if (IsEngineInitialized()) | 2424 if (IsEngineInitialized()) |
2425 ReconfigureDatatypeManager(); | 2425 ReconfigureDatatypeManager(); |
2426 NotifyObservers(); | 2426 NotifyObservers(); |
2427 } | 2427 } |
2428 | 2428 |
2429 } // namespace browser_sync | 2429 } // namespace browser_sync |
OLD | NEW |