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

Side by Side Diff: chrome/browser/notifications/native_notification_display_service.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/native_notification_display_service.h" 5 #include "chrome/browser/notifications/native_notification_display_service.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/notifications/non_persistent_notification_handler.h" 9 #include "chrome/browser/notifications/non_persistent_notification_handler.h"
10 #include "chrome/browser/notifications/notification.h" 10 #include "chrome/browser/notifications/notification.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 notification_handlers_.erase(notification_type); 108 notification_handlers_.erase(notification_type);
109 } 109 }
110 110
111 NotificationHandler* NativeNotificationDisplayService::GetNotificationHandler( 111 NotificationHandler* NativeNotificationDisplayService::GetNotificationHandler(
112 NotificationCommon::Type notification_type) { 112 NotificationCommon::Type notification_type) {
113 DCHECK(notification_handlers_.find(notification_type) != 113 DCHECK(notification_handlers_.find(notification_type) !=
114 notification_handlers_.end()) 114 notification_handlers_.end())
115 << notification_type << " is not registered."; 115 << notification_type << " is not registered.";
116 return notification_handlers_[notification_type].get(); 116 return notification_handlers_[notification_type].get();
117 } 117 }
118
119 bool NativeNotificationDisplayService::SupportsNotificationCenter() const {
120 return notification_bridge_->SupportsNotificationCenter();
121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698