| 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 #ifndef COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 5 #ifndef COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
| 6 #define COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 6 #define COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
| 12 #include "components/drive/drive_notification_observer.h" | 12 #include "components/drive/drive_notification_observer.h" |
| 13 #include "components/invalidation/public/invalidation_handler.h" | 13 #include "components/invalidation/public/invalidation_handler.h" |
| 14 #include "components/keyed_service/core/keyed_service.h" | 14 #include "components/keyed_service/core/keyed_service.h" |
| 15 | 15 |
| 16 namespace browser_sync { | |
| 17 class ProfileSyncService; | |
| 18 } // namespace browser_sync | |
| 19 | |
| 20 namespace invalidation { | 16 namespace invalidation { |
| 21 class InvalidationService; | 17 class InvalidationService; |
| 22 } // namespace invalidation | 18 } // namespace invalidation |
| 23 | 19 |
| 24 namespace drive { | 20 namespace drive { |
| 25 | 21 |
| 26 // Informs observers when they should check Google Drive for updates. | 22 // Informs observers when they should check Google Drive for updates. |
| 27 // Conditions under which updates should be searched: | 23 // Conditions under which updates should be searched: |
| 28 // 1. XMPP invalidation is received from Google Drive. | 24 // 1. XMPP invalidation is received from Google Drive. |
| 29 // 2. Polling timer counts down. | 25 // 2. Polling timer counts down. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Note: This should remain the last member so it'll be destroyed and | 88 // Note: This should remain the last member so it'll be destroyed and |
| 93 // invalidate its weak pointers before any other members are destroyed. | 89 // invalidate its weak pointers before any other members are destroyed. |
| 94 base::WeakPtrFactory<DriveNotificationManager> weak_ptr_factory_; | 90 base::WeakPtrFactory<DriveNotificationManager> weak_ptr_factory_; |
| 95 | 91 |
| 96 DISALLOW_COPY_AND_ASSIGN(DriveNotificationManager); | 92 DISALLOW_COPY_AND_ASSIGN(DriveNotificationManager); |
| 97 }; | 93 }; |
| 98 | 94 |
| 99 } // namespace drive | 95 } // namespace drive |
| 100 | 96 |
| 101 #endif // COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ | 97 #endif // COMPONENTS_DRIVE_DRIVE_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |