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

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

Issue 2300093002: Make //content responsible for generating notification Ids (Closed)
Patch Set: Make //content responsible for generating notification Ids 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.cc
diff --git a/content/browser/notifications/notification_id_generator.cc b/content/browser/notifications/notification_id_generator.cc
index 7bdbb2cfcc317319aa21b06543a7c506c9f36b5c..2e2a36c285901335292562b363a9dc2e25d35a44 100644
--- a/content/browser/notifications/notification_id_generator.cc
+++ b/content/browser/notifications/notification_id_generator.cc
@@ -42,10 +42,8 @@ std::string ComputeBrowserContextHash(BrowserContext* browser_context) {
} // namespace
NotificationIdGenerator::NotificationIdGenerator(
- BrowserContext* browser_context,
- int render_process_id)
- : browser_context_(browser_context),
- render_process_id_(render_process_id) {}
+ BrowserContext* browser_context)
+ : browser_context_(browser_context) {}
NotificationIdGenerator::~NotificationIdGenerator() {}
@@ -90,7 +88,8 @@ std::string NotificationIdGenerator::GenerateForPersistentNotification(
std::string NotificationIdGenerator::GenerateForNonPersistentNotification(
const GURL& origin,
const std::string& tag,
- int non_persistent_notification_id) const {
+ int non_persistent_notification_id,
+ int render_process_id) const {
DCHECK(origin.is_valid());
DCHECK_EQ(origin, origin.GetOrigin());
@@ -106,7 +105,7 @@ std::string NotificationIdGenerator::GenerateForNonPersistentNotification(
stream << base::IntToString(!tag.empty());
if (tag.empty()) {
- stream << base::IntToString(render_process_id_);
+ stream << base::IntToString(render_process_id);
stream << kSeparator;
stream << base::IntToString(non_persistent_notification_id);

Powered by Google App Engine
This is Rietveld 408576698