| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/engine/all_status.h" | 5 #include "chrome/browser/sync/engine/all_status.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/port.h" | 10 #include "base/port.h" |
| 11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
| 12 #include "chrome/browser/sync/engine/auth_watcher.h" | 12 #include "chrome/browser/sync/engine/auth_watcher.h" |
| 13 #include "chrome/browser/sync/engine/net/gaia_authenticator.h" | 13 #include "chrome/browser/sync/engine/net/gaia_authenticator.h" |
| 14 #include "chrome/browser/sync/engine/net/server_connection_manager.h" | 14 #include "chrome/browser/sync/engine/net/server_connection_manager.h" |
| 15 #include "chrome/browser/sync/engine/syncer.h" | 15 #include "chrome/browser/sync/engine/syncer.h" |
| 16 #include "chrome/browser/sync/engine/syncer_thread.h" | 16 #include "chrome/browser/sync/engine/syncer_thread.h" |
| 17 #include "chrome/browser/sync/notifier/listener/talk_mediator.h" | |
| 18 #include "chrome/browser/sync/protocol/service_constants.h" | 17 #include "chrome/browser/sync/protocol/service_constants.h" |
| 19 #include "chrome/browser/sync/sessions/session_state.h" | 18 #include "chrome/browser/sync/sessions/session_state.h" |
| 20 #include "chrome/browser/sync/syncable/directory_manager.h" | 19 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 21 #include "chrome/common/deprecated/event_sys-inl.h" | 20 #include "chrome/common/deprecated/event_sys-inl.h" |
| 21 #include "chrome/common/net/notifier/listener/talk_mediator.h" |
| 22 | 22 |
| 23 namespace browser_sync { | 23 namespace browser_sync { |
| 24 | 24 |
| 25 static const time_t kMinSyncObserveInterval = 10; // seconds | 25 static const time_t kMinSyncObserveInterval = 10; // seconds |
| 26 | 26 |
| 27 // Backoff interval randomization factor. | 27 // Backoff interval randomization factor. |
| 28 static const int kBackoffRandomizationFactor = 2; | 28 static const int kBackoffRandomizationFactor = 2; |
| 29 | 29 |
| 30 const int AllStatus::kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours. | 30 const int AllStatus::kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours. |
| 31 | 31 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 allstatus_->mutex_.Release(); | 335 allstatus_->mutex_.Release(); |
| 336 if (event_.what_changed) | 336 if (event_.what_changed) |
| 337 allstatus_->channel()->NotifyListeners(event_); | 337 allstatus_->channel()->NotifyListeners(event_); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void ScopedStatusLockWithNotify::NotifyOverQuota() { | 340 void ScopedStatusLockWithNotify::NotifyOverQuota() { |
| 341 event_.what_changed |= AllStatusEvent::OVER_QUOTA; | 341 event_.what_changed |= AllStatusEvent::OVER_QUOTA; |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace browser_sync | 344 } // namespace browser_sync |
| OLD | NEW |