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/glue/sync_backend_host.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 const base::Closure& retry_callback) { | 1379 const base::Closure& retry_callback) { |
1380 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 1380 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
1381 host_.Call(FROM_HERE, | 1381 host_.Call(FROM_HERE, |
1382 &SyncBackendHost::RetryConfigurationOnFrontendLoop, | 1382 &SyncBackendHost::RetryConfigurationOnFrontendLoop, |
1383 retry_callback); | 1383 retry_callback); |
1384 } | 1384 } |
1385 | 1385 |
1386 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 1386 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
1387 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 1387 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
1388 if (file_util::DirectoryExists(sync_data_folder_path_)) { | 1388 if (file_util::DirectoryExists(sync_data_folder_path_)) { |
1389 if (!file_util::Delete(sync_data_folder_path_, true)) | 1389 if (!base::Delete(sync_data_folder_path_, true)) |
1390 SLOG(DFATAL) << "Could not delete the Sync Data folder."; | 1390 SLOG(DFATAL) << "Could not delete the Sync Data folder."; |
1391 } | 1391 } |
1392 } | 1392 } |
1393 | 1393 |
1394 void SyncBackendHost::Core::StartSavingChanges() { | 1394 void SyncBackendHost::Core::StartSavingChanges() { |
1395 // We may already be shut down. | 1395 // We may already be shut down. |
1396 if (!sync_loop_) | 1396 if (!sync_loop_) |
1397 return; | 1397 return; |
1398 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 1398 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
1399 DCHECK(!save_changes_timer_.get()); | 1399 DCHECK(!save_changes_timer_.get()); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 DVLOG(1) << "Connection status changed: " | 1618 DVLOG(1) << "Connection status changed: " |
1619 << syncer::ConnectionStatusToString(status); | 1619 << syncer::ConnectionStatusToString(status); |
1620 frontend_->OnConnectionStatusChange(status); | 1620 frontend_->OnConnectionStatusChange(status); |
1621 } | 1621 } |
1622 | 1622 |
1623 #undef SDVLOG | 1623 #undef SDVLOG |
1624 | 1624 |
1625 #undef SLOG | 1625 #undef SLOG |
1626 | 1626 |
1627 } // namespace browser_sync | 1627 } // namespace browser_sync |
OLD | NEW |