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

Unified Diff: content/browser/notifications/notification_id_generator.h

Issue 2300093002: Make //content responsible for generating notification Ids (Closed)
Patch Set: comments Created 4 years, 3 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: content/browser/notifications/notification_id_generator.h
diff --git a/content/browser/notifications/notification_id_generator.h b/content/browser/notifications/notification_id_generator.h
index 81e457bf0f62c0dbdf6f3789a328beed25bd0303..d279e194b37d3c3acf2220244125d7e5d97d9308 100644
--- a/content/browser/notifications/notification_id_generator.h
+++ b/content/browser/notifications/notification_id_generator.h
@@ -37,8 +37,7 @@ class BrowserContext;
// notification id can outlive the browser process responsible for creating it.
class CONTENT_EXPORT NotificationIdGenerator {
public:
- NotificationIdGenerator(BrowserContext* browser_context,
- int render_process_id);
+ explicit NotificationIdGenerator(BrowserContext* browser_context);
~NotificationIdGenerator();
// Returns whether |notification_id| belongs to a persistent notification.
@@ -59,17 +58,16 @@ class CONTENT_EXPORT NotificationIdGenerator {
// Generates an id for a non-persistent notification given the notification's
// origin, tag and non-persistent notification id. The non-persistent
- // notification id will have created by the renderer with |render_process_id|.
+ // notification id must've been created by the |render_process_id|.
std::string GenerateForNonPersistentNotification(
const GURL& origin,
const std::string& tag,
- int non_persistent_notification_id) const;
+ int non_persistent_notification_id,
+ int render_process_id) const;
private:
// The NotificationMessageFilter that owns |this| will outlive the context.
BrowserContext* browser_context_;
-
- int render_process_id_;
};
} // namespace context

Powered by Google App Engine
This is Rietveld 408576698