summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_app_api.cc
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-18 20:11:42 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-18 20:11:42 +0000
commit851881b6addae55ecb2f2c02383962f2ca1baab4 (patch)
tree117bc357c78906fdff5fb81358a08305bf92f4fa /chrome/browser/extensions/extension_app_api.cc
parent8866f623dfd914c9f4c26ab96f90aecf4a372ef9 (diff)
downloadchromium_src-851881b6addae55ecb2f2c02383962f2ca1baab4.zip
chromium_src-851881b6addae55ecb2f2c02383962f2ca1baab4.tar.gz
chromium_src-851881b6addae55ecb2f2c02383962f2ca1baab4.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 There is anotehr part for the full notifications sync to work that will be done in a separate CL. Review URL: http://codereview.chromium.org/8263002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_app_api.cc')
-rw-r--r--chrome/browser/extensions/extension_app_api.cc5
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 d89526c..45e666a 100644
--- a/chrome/browser/extensions/extension_app_api.cc
+++ b/chrome/browser/extensions/extension_app_api.cc
@@ -45,7 +45,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;
@@ -68,7 +69,7 @@ bool AppNotifyFunction::RunImpl() {
AppNotificationManager* manager =
profile()->GetExtensionService()->app_notification_manager();
- manager->Add(id, item.release());
+ manager->Add(item.release());
NotificationService::current()->Notify(
chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED,