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

Unified Diff: content/child/notifications/notification_manager.cc

Issue 2537953003: WebString: makes string16 conversions explicit (part 1: blink, content) (Closed)
Patch Set: fix Created 4 years 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/child/notifications/notification_manager.cc
diff --git a/content/child/notifications/notification_manager.cc b/content/child/notifications/notification_manager.cc
index cc6ee3e7c33d13d3006885b0e4421862335e742d..0ee69d90725887e6f9f7cb987707a9df920cc8ca 100644
--- a/content/child/notifications/notification_manager.cc
+++ b/content/child/notifications/notification_manager.cc
@@ -95,8 +95,7 @@ void NotificationManager::show(
notification_dispatcher_->GenerateNotificationId(CurrentWorkerId());
active_page_notifications_[notification_id] = ActiveNotificationData(
- delegate, origin_gurl,
- base::UTF16ToUTF8(base::StringPiece16(notification_data.tag)));
+ delegate, origin_gurl, notification_data.tag.utf8());
// TODO(mkwst): This is potentially doing the wrong thing with unique
// origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See
@@ -180,8 +179,7 @@ void NotificationManager::getNotifications(
request_id);
thread_safe_sender_->Send(new PlatformNotificationHostMsg_GetNotifications(
- request_id, service_worker_registration_id, origin,
- base::UTF16ToUTF8(base::StringPiece16(filter_tag))));
+ request_id, service_worker_registration_id, origin, filter_tag.utf8()));
}
void NotificationManager::close(blink::WebNotificationDelegate* delegate) {
@@ -208,8 +206,7 @@ void NotificationManager::closePersistent(
// TODO(mkwst): This is potentially doing the wrong thing with unique
// origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See
// https://crbug.com/490074 for detail.
- url::Origin(origin).GetURL(), base::UTF16ToUTF8(base::StringPiece16(tag)),
- base::UTF16ToUTF8(base::StringPiece16(notification_id))));
+ url::Origin(origin).GetURL(), tag.utf8(), notification_id.utf8()));
}
void NotificationManager::notifyDelegateDestroyed(

Powered by Google App Engine
This is Rietveld 408576698