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
3 // found in the LICENSE file.
5 #include "chrome/browser/google_apis/drive_notification_manager.h"
7 #include "chrome/browser/google_apis/drive_notification_observer.h"
8 #include "chrome/browser/profiles/profile.h"
10 namespace google_apis
{
12 // TODO(calvinlo): Constants for polling and XMPP sync mechanisms go here.
14 DriveNotificationManager::DriveNotificationManager(Profile
* profile
)
16 // TODO(calvinlo): Initialize member variables for polling and XMPP here.
19 DriveNotificationManager::~DriveNotificationManager() {}
21 void DriveNotificationManager::Shutdown() {
22 // TODO(calvinlo): Unregister for Drive notifications goes here.
25 // TODO(calvinlo): Implementations for syncer::InvalidationHandler go here.
26 // Implement OnInvalidatorStateChange() and OnIncomingInvalidation().
28 void DriveNotificationManager::AddObserver(
29 DriveNotificationObserver
* observer
) {
30 observers_
.AddObserver(observer
);
33 void DriveNotificationManager::RemoveObserver(
34 DriveNotificationObserver
* observer
) {
35 observers_
.RemoveObserver(observer
);
38 void DriveNotificationManager::NotifyObserversToUpdate() {
39 FOR_EACH_OBSERVER(DriveNotificationObserver
, observers_
, CheckForUpdates());
42 } // namespace google_apis