Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/notifications/sync_notifier/chrome_notifier_service.h

Issue 411463003: [Sync] Trigger refresh for synced notifications on context change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "components/keyed_service/core/keyed_service.h" 9 #include "components/keyed_service/core/keyed_service.h"
10 10
(...skipping 19 matching lines...) Expand all
30 virtual void Shutdown() OVERRIDE; 30 virtual void Shutdown() OVERRIDE;
31 31
32 // Returns the SyncableService for syncer::SYNCED_NOTIFICATIONS and 32 // Returns the SyncableService for syncer::SYNCED_NOTIFICATIONS and
33 // syncer::SYNCED_NOTIFICATION_APP_INFO 33 // syncer::SYNCED_NOTIFICATION_APP_INFO
34 SyncedNotificationsShim* GetSyncedNotificationsShim(); 34 SyncedNotificationsShim* GetSyncedNotificationsShim();
35 35
36 private: 36 private:
37 // Helper method for firing JS events triggered by sync. 37 // Helper method for firing JS events triggered by sync.
38 void FireSyncJSEvent(scoped_ptr<extensions::Event> event); 38 void FireSyncJSEvent(scoped_ptr<extensions::Event> event);
39 39
40 // Helper method for trigger synced notification refreshes.
41 void NotifyRefreshNeeded();
42
40 // The owning profile. 43 // The owning profile.
41 Profile* const profile_; 44 Profile* const profile_;
42 45
43 // Shim connecting the JS private api to sync. // TODO(zea): delete all other 46 // Shim connecting the JS private api to sync. // TODO(zea): delete all other
44 // code. 47 // code.
45 scoped_ptr<SyncedNotificationsShim> synced_notifications_shim_; 48 scoped_ptr<SyncedNotificationsShim> synced_notifications_shim_;
46 49
47 base::WeakPtrFactory<ChromeNotifierService> weak_ptr_factory_; 50 base::WeakPtrFactory<ChromeNotifierService> weak_ptr_factory_;
48 51
49 DISALLOW_COPY_AND_ASSIGN(ChromeNotifierService); 52 DISALLOW_COPY_AND_ASSIGN(ChromeNotifierService);
50 }; 53 };
51 54
52 } // namespace notifier 55 } // namespace notifier
53 56
54 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_ 57 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_CHROME_NOTIFIER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698