diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 04:45:49 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 04:45:49 +0000 |
commit | 7f22e35fd5c25325c2b44dad757d33b2fc4b745a (patch) | |
tree | 6fcda6ffdf8dfdcf0378c5da2fb8fbb0e1b49db1 /chrome/browser/extensions/extension_app_api.cc | |
parent | 645ef96b909147f0787f4afa53f39594cb78b211 (diff) | |
download | chromium_src-7f22e35fd5c25325c2b44dad757d33b2fc4b745a.zip chromium_src-7f22e35fd5c25325c2b44dad757d33b2fc4b745a.tar.gz chromium_src-7f22e35fd5c25325c2b44dad757d33b2fc4b745a.tar.bz2 |
Implement SyncableService in AppNotificationsManager:
- Implement all methods of SyncableService
- Modify existing methods that change the model (Add and ClearAll) to push changes to sync.
- Add some extra properties to AppNotification: guid and extension id
- Disallow operations on model until storage is loaded.
- Ton of unit tests for sync methods
Review URL: http://codereview.chromium.org/8355030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_app_api.cc')
-rw-r--r-- | chrome/browser/extensions/extension_app_api.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_app_api.cc b/chrome/browser/extensions/extension_app_api.cc index e301795..89aa654 100644 --- a/chrome/browser/extensions/extension_app_api.cc +++ b/chrome/browser/extensions/extension_app_api.cc @@ -46,7 +46,8 @@ bool AppNotifyFunction::RunImpl() { if (details->HasKey(kBodyTextKey)) EXTENSION_FUNCTION_VALIDATE(details->GetString(kBodyTextKey, &body)); - scoped_ptr<AppNotification> item(new AppNotification(title, body)); + scoped_ptr<AppNotification> item(new AppNotification( + true, "", id, title, body)); if (details->HasKey(kLinkUrlKey)) { std::string link_url; @@ -69,7 +70,7 @@ bool AppNotifyFunction::RunImpl() { AppNotificationManager* manager = profile()->GetExtensionService()->app_notification_manager(); - manager->Add(id, item.release()); + manager->Add(item.release()); content::NotificationService::current()->Notify( chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, |