| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/syncer_command.h" | 5 #include "chrome/browser/sync/engine/syncer_command.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/engine/net/server_connection_manager.h" | 7 #include "chrome/browser/sync/engine/net/server_connection_manager.h" |
| 8 #include "chrome/browser/sync/sessions/sync_session.h" | 8 #include "chrome/browser/sync/sessions/sync_session.h" |
| 9 #include "chrome/browser/sync/syncable/directory_manager.h" | 9 #include "chrome/browser/sync/syncable/directory_manager.h" |
| 10 #include "chrome/browser/sync/util/sync_types.h" | 10 #include "chrome/browser/sync/util/sync_types.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 if (!dir.good()) { | 27 if (!dir.good()) { |
| 28 LOG(ERROR) << "Scoped dir lookup failed!"; | 28 LOG(ERROR) << "Scoped dir lookup failed!"; |
| 29 return; | 29 return; |
| 30 } | 30 } |
| 31 | 31 |
| 32 if (session->status_controller()->TestAndClearIsDirty()) { | 32 if (session->status_controller()->TestAndClearIsDirty()) { |
| 33 SyncerEvent event(SyncerEvent::STATUS_CHANGED); | 33 SyncerEvent event(SyncerEvent::STATUS_CHANGED); |
| 34 const sessions::SyncSessionSnapshot& snapshot(session->TakeSnapshot()); | 34 const sessions::SyncSessionSnapshot& snapshot(session->TakeSnapshot()); |
| 35 event.snapshot = &snapshot; | 35 event.snapshot = &snapshot; |
| 36 DCHECK(session->context()->syncer_event_channel()); | 36 DCHECK(session->context()->syncer_event_channel()); |
| 37 session->context()->syncer_event_channel()->NotifyListeners(event); | 37 session->context()->syncer_event_channel()->Notify(event); |
| 38 if (session->status_controller()->syncer_status().over_quota) { | 38 if (session->status_controller()->syncer_status().over_quota) { |
| 39 SyncerEvent quota_event(SyncerEvent::OVER_QUOTA); | 39 SyncerEvent quota_event(SyncerEvent::OVER_QUOTA); |
| 40 quota_event.snapshot = &snapshot; | 40 quota_event.snapshot = &snapshot; |
| 41 session->context()->syncer_event_channel()->NotifyListeners(quota_event); | 41 session->context()->syncer_event_channel()->Notify(quota_event); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace browser_sync | 46 } // namespace browser_sync |
| OLD | NEW |