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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // This should only be called on the sync thread. | 157 // This should only be called on the sync thread. |
158 void DeleteSyncDataFolder(const base::FilePath& directory_path) { | 158 void DeleteSyncDataFolder(const base::FilePath& directory_path) { |
159 if (base::DirectoryExists(directory_path)) { | 159 if (base::DirectoryExists(directory_path)) { |
160 if (!base::DeleteFile(directory_path, true)) | 160 if (!base::DeleteFile(directory_path, true)) |
161 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 161 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 } // namespace | 165 } // namespace |
166 | 166 |
167 bool ShouldShowActionOnUI(const syncer::SyncProtocolError& error) { | |
168 return (error.action != syncer::UNKNOWN_ACTION && | |
169 error.action != syncer::DISABLE_SYNC_ON_CLIENT && | |
170 error.action != syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT && | |
171 error.action != syncer::RESET_LOCAL_SYNC_DATA); | |
172 } | |
173 | |
174 ProfileSyncService::InitParams::InitParams() = default; | 167 ProfileSyncService::InitParams::InitParams() = default; |
175 ProfileSyncService::InitParams::~InitParams() = default; | 168 ProfileSyncService::InitParams::~InitParams() = default; |
176 ProfileSyncService::InitParams::InitParams(InitParams&& other) // NOLINT | 169 ProfileSyncService::InitParams::InitParams(InitParams&& other) // NOLINT |
177 : sync_client(std::move(other.sync_client)), | 170 : sync_client(std::move(other.sync_client)), |
178 signin_wrapper(std::move(other.signin_wrapper)), | 171 signin_wrapper(std::move(other.signin_wrapper)), |
179 oauth2_token_service(other.oauth2_token_service), | 172 oauth2_token_service(other.oauth2_token_service), |
180 gaia_cookie_manager_service(other.gaia_cookie_manager_service), | 173 gaia_cookie_manager_service(other.gaia_cookie_manager_service), |
181 start_behavior(other.start_behavior), | 174 start_behavior(other.start_behavior), |
182 network_time_update_callback( | 175 network_time_update_callback( |
183 std::move(other.network_time_update_callback)), | 176 std::move(other.network_time_update_callback)), |
(...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 | 2489 |
2497 DCHECK(startup_controller_->IsSetupInProgress()); | 2490 DCHECK(startup_controller_->IsSetupInProgress()); |
2498 startup_controller_->SetSetupInProgress(false); | 2491 startup_controller_->SetSetupInProgress(false); |
2499 | 2492 |
2500 if (IsBackendInitialized()) | 2493 if (IsBackendInitialized()) |
2501 ReconfigureDatatypeManager(); | 2494 ReconfigureDatatypeManager(); |
2502 NotifyObservers(); | 2495 NotifyObservers(); |
2503 } | 2496 } |
2504 | 2497 |
2505 } // namespace browser_sync | 2498 } // namespace browser_sync |
OLD | NEW |