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

Unified Diff: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp

Issue 2392543004: Reflow comments in the Push and Notification modules. (Closed)
Patch Set: Reflow comments in the Push and Notification modules. Created 4 years, 2 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: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
index 1a6f62c330bb8912e5225636b25b2c9e5051a26b..e799a9b3ef1d117714013dc2171e406a7dc31900 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
@@ -67,7 +67,8 @@ ScriptPromise ServiceWorkerRegistrationNotifications::showNotification(
ExceptionState& exceptionState) {
ExecutionContext* executionContext = scriptState->getExecutionContext();
- // If context object's active worker is null, reject promise with a TypeError exception.
+ // If context object's active worker is null, reject the promise with a
+ // TypeError exception.
if (!registration.active())
return ScriptPromise::reject(
scriptState,
@@ -75,7 +76,8 @@ ScriptPromise ServiceWorkerRegistrationNotifications::showNotification(
"No active registration available on "
"the ServiceWorkerRegistration."));
- // If permission for notification's origin is not "granted", reject promise with a TypeError exception, and terminate these substeps.
+ // If permission for notification's origin is not "granted", reject the
+ // promise with a TypeError exception, and terminate these substeps.
if (NotificationManager::from(executionContext)->permissionStatus() !=
mojom::blink::PermissionStatus::GRANTED)
return ScriptPromise::reject(
@@ -84,13 +86,16 @@ ScriptPromise ServiceWorkerRegistrationNotifications::showNotification(
scriptState->isolate(),
"No notification permission has been granted for this origin."));
- // Validate the developer-provided values to get a WebNotificationData object.
+ // Validate the developer-provided options to get the WebNotificationData.
WebNotificationData data = createWebNotificationData(executionContext, title,
options, exceptionState);
if (exceptionState.hadException())
return exceptionState.reject(scriptState);
- // Log number of actions developer provided in linear histogram: 0 -> underflow bucket, 1-16 -> distinct buckets, 17+ -> overflow bucket.
+ // Log number of actions developer provided in linear histogram:
+ // 0 -> underflow bucket,
+ // 1-16 -> distinct buckets,
+ // 17+ -> overflow bucket.
DEFINE_THREAD_SAFE_STATIC_LOCAL(
EnumerationHistogram, notificationCountHistogram,
new EnumerationHistogram(

Powered by Google App Engine
This is Rietveld 408576698