| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_file_system/sync_process_runner.h" | 5 #include "chrome/browser/sync_file_system/sync_process_runner.h" |
| 6 | 6 |
| 7 #include "base/debug/stack_trace.h" |
| 7 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 8 #include "chrome/browser/sync_file_system/logger.h" | 9 #include "chrome/browser/sync_file_system/logger.h" |
| 9 | 10 |
| 10 namespace sync_file_system { | 11 namespace sync_file_system { |
| 11 | 12 |
| 12 const int64 SyncProcessRunner::kSyncDelayInMilliseconds = | 13 const int64 SyncProcessRunner::kSyncDelayInMilliseconds = |
| 13 1 * base::Time::kMillisecondsPerSecond; // 1 sec | 14 1 * base::Time::kMillisecondsPerSecond; // 1 sec |
| 14 const int64 SyncProcessRunner::kSyncDelayWithSyncError = | 15 const int64 SyncProcessRunner::kSyncDelayWithSyncError = |
| 15 3 * base::Time::kMillisecondsPerSecond; // 3 sec | 16 3 * base::Time::kMillisecondsPerSecond; // 3 sec |
| 16 const int64 SyncProcessRunner::kSyncDelayFastInMilliseconds = 100; // 100 ms | 17 const int64 SyncProcessRunner::kSyncDelayFastInMilliseconds = 100; // 100 ms |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 FROM_HERE, next_scheduled - now, | 238 FROM_HERE, next_scheduled - now, |
| 238 base::Bind(&SyncProcessRunner::Run, base::Unretained(this))); | 239 base::Bind(&SyncProcessRunner::Run, base::Unretained(this))); |
| 239 } | 240 } |
| 240 | 241 |
| 241 void SyncProcessRunner::CheckIfIdle() { | 242 void SyncProcessRunner::CheckIfIdle() { |
| 242 if (pending_changes_ == 0 && running_tasks_ == 0) | 243 if (pending_changes_ == 0 && running_tasks_ == 0) |
| 243 client_->OnSyncIdle(); | 244 client_->OnSyncIdle(); |
| 244 } | 245 } |
| 245 | 246 |
| 246 } // namespace sync_file_system | 247 } // namespace sync_file_system |
| OLD | NEW |