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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 << "Initialize() called more than once."; | 304 << "Initialize() called more than once."; |
305 sync_error_controller_.reset(new SyncErrorController(this)); | 305 sync_error_controller_.reset(new SyncErrorController(this)); |
306 AddObserver(sync_error_controller_.get()); | 306 AddObserver(sync_error_controller_.get()); |
307 #endif | 307 #endif |
308 | 308 |
309 startup_controller_.Reset(GetRegisteredDataTypes()); | 309 startup_controller_.Reset(GetRegisteredDataTypes()); |
310 startup_controller_.TryStart(); | 310 startup_controller_.TryStart(); |
311 | 311 |
312 backup_rollback_controller_.Start(backup_start_delay_); | 312 backup_rollback_controller_.Start(backup_start_delay_); |
313 | 313 |
314 #if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_C
HROMEOS)) | 314 #if defined(ENABLE_PRE_SYNC_BACKUP) |
315 if (CommandLine::ForCurrentProcess()->HasSwitch( | 315 if (CommandLine::ForCurrentProcess()->HasSwitch( |
316 switches::kSyncDisableBackup)) { | 316 switches::kSyncDisableBackup)) { |
317 profile_->GetIOTaskRunner()->PostDelayedTask( | 317 profile_->GetIOTaskRunner()->PostDelayedTask( |
318 FROM_HERE, | 318 FROM_HERE, |
319 base::Bind(base::IgnoreResult(base::DeleteFile), | 319 base::Bind(base::IgnoreResult(base::DeleteFile), |
320 profile_->GetPath().Append(kSyncBackupDataFolderName), | 320 profile_->GetPath().Append(kSyncBackupDataFolderName), |
321 true), | 321 true), |
322 backup_start_delay_); | 322 backup_start_delay_); |
323 } | 323 } |
324 #endif | 324 #endif |
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2550 if (custom_sync_url.is_valid()) { | 2550 if (custom_sync_url.is_valid()) { |
2551 result = custom_sync_url; | 2551 result = custom_sync_url; |
2552 } else { | 2552 } else { |
2553 LOG(WARNING) << "The following sync URL specified at the command-line " | 2553 LOG(WARNING) << "The following sync URL specified at the command-line " |
2554 << "is invalid: " << value; | 2554 << "is invalid: " << value; |
2555 } | 2555 } |
2556 } | 2556 } |
2557 } | 2557 } |
2558 return result; | 2558 return result; |
2559 } | 2559 } |
OLD | NEW |