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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // This should only be called on the sync thread. | 163 // This should only be called on the sync thread. |
164 void DeleteSyncDataFolder(const base::FilePath& directory_path) { | 164 void DeleteSyncDataFolder(const base::FilePath& directory_path) { |
165 if (base::DirectoryExists(directory_path)) { | 165 if (base::DirectoryExists(directory_path)) { |
166 if (!base::DeleteFile(directory_path, true)) | 166 if (!base::DeleteFile(directory_path, true)) |
167 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 167 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 } // namespace | 171 } // namespace |
172 | 172 |
173 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error) { | |
174 return (error.action != syncer::UNKNOWN_ACTION && | |
175 error.action != syncer::DISABLE_SYNC_ON_CLIENT && | |
176 error.action != syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT && | |
177 error.action != syncer::RESET_LOCAL_SYNC_DATA); | |
178 } | |
179 | |
180 ProfileSyncService::InitParams::InitParams() = default; | 173 ProfileSyncService::InitParams::InitParams() = default; |
181 ProfileSyncService::InitParams::~InitParams() = default; | 174 ProfileSyncService::InitParams::~InitParams() = default; |
182 ProfileSyncService::InitParams::InitParams(InitParams&& other) // NOLINT | 175 ProfileSyncService::InitParams::InitParams(InitParams&& other) // NOLINT |
183 : sync_client(std::move(other.sync_client)), | 176 : sync_client(std::move(other.sync_client)), |
184 signin_wrapper(std::move(other.signin_wrapper)), | 177 signin_wrapper(std::move(other.signin_wrapper)), |
185 oauth2_token_service(other.oauth2_token_service), | 178 oauth2_token_service(other.oauth2_token_service), |
186 gaia_cookie_manager_service(other.gaia_cookie_manager_service), | 179 gaia_cookie_manager_service(other.gaia_cookie_manager_service), |
187 start_behavior(other.start_behavior), | 180 start_behavior(other.start_behavior), |
188 network_time_update_callback( | 181 network_time_update_callback( |
189 std::move(other.network_time_update_callback)), | 182 std::move(other.network_time_update_callback)), |
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2532 | 2525 |
2533 DCHECK(startup_controller_->IsSetupInProgress()); | 2526 DCHECK(startup_controller_->IsSetupInProgress()); |
2534 startup_controller_->SetSetupInProgress(false); | 2527 startup_controller_->SetSetupInProgress(false); |
2535 | 2528 |
2536 if (IsBackendInitialized()) | 2529 if (IsBackendInitialized()) |
2537 ReconfigureDatatypeManager(); | 2530 ReconfigureDatatypeManager(); |
2538 NotifyObservers(); | 2531 NotifyObservers(); |
2539 } | 2532 } |
2540 | 2533 |
2541 } // namespace browser_sync | 2534 } // namespace browser_sync |
OLD | NEW |