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

Unified Diff: chrome/browser/extensions/api/notifications/notifications_api.cc

Issue 2799343003: Add support for native extension notifications (Closed)
Patch Set: Created 3 years, 8 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/extensions/api/notifications/notifications_api.cc
diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
index c69c831c85726a36110404d8906c66d054560183..7bbfc31bffef5c4fd4fee3d2b755b72c4be00d10 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -443,6 +443,8 @@ bool NotificationsApiFunction::CreateNotification(
if (options->context_message) {
optional_fields.context_message =
base::UTF8ToUTF16(*options->context_message);
+ } else {
+ optional_fields.context_message = base::UTF8ToUTF16("");
Peter Beverloo 2017/04/07 02:26:53 Why is this necessary? I think this is a no-op? It
Miguel Garcia 2017/04/07 13:32:06 You are right, it was not needed.
}
bool has_image = options->image_bitmap.get() &&
@@ -584,6 +586,8 @@ bool NotificationsApiFunction::UpdateNotification(
if (options->context_message) {
notification->set_context_message(
base::UTF8ToUTF16(*options->context_message));
+ } else {
+ notification->set_context_message(base::UTF8ToUTF16(""));
Peter Beverloo 2017/04/07 02:26:53 (dito)
Miguel Garcia 2017/04/07 13:32:06 Acknowledged.
}
gfx::Image image;

Powered by Google App Engine
This is Rietveld 408576698