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

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.h

Issue 1026853002: Integrate the notification database with the normal code path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-ConfirmShow
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/platform_notification_service_impl.h
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
index 85ef42271ab759003dc352864d8ca4c1be6edd1c..c83e0883e3d88bfdab5b9e612cd1ea3ad6eef372 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.h
+++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
#define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
+#include <stdint.h>
+#include <map>
+
#include "base/gtest_prod_util.h"
#include "base/memory/singleton.h"
#include "base/strings/string16.h"
@@ -34,10 +37,8 @@ class PlatformNotificationServiceImpl
// needed, on which the event will be fired. Must be called on the UI thread.
void OnPersistentNotificationClick(
content::BrowserContext* browser_context,
- int64 service_worker_registration_id,
- const std::string& notification_id,
+ int64_t persistent_notification_id,
const GURL& origin,
- const content::PlatformNotificationData& notification_data,
const base::Callback<void(content::PersistentNotificationStatus)>&
callback) const;
@@ -63,13 +64,13 @@ class PlatformNotificationServiceImpl
base::Closure* cancel_callback) override;
void DisplayPersistentNotification(
content::BrowserContext* browser_context,
- int64 service_worker_registration_id,
+ int64_t persistent_notification_id,
const GURL& origin,
const SkBitmap& icon,
const content::PlatformNotificationData& notification_data) override;
void ClosePersistentNotification(
content::BrowserContext* browser_context,
- const std::string& persistent_notification_id) override;
+ int64_t persistent_notification_id) override;
private:
friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>;
@@ -114,6 +115,10 @@ class PlatformNotificationServiceImpl
// Weak reference. Ownership maintains with the test.
NotificationUIManager* notification_ui_manager_for_tests_;
+ // Mapping between a persistent notification id and the id of the associated
+ // message_center::Notification object.
+ std::map<int64_t, std::string> persistent_notifications_;
johnme 2015/04/02 17:21:06 Please add to comment: Must only be used on UI thr
Peter Beverloo 2015/04/07 17:46:11 Done.
+
DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
};

Powered by Google App Engine
This is Rietveld 408576698