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

Unified Diff: third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)
Patch Set: Codereview: nit Created 3 years, 10 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/core/html/HTMLIFrameElementPermissions.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp b/third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp
index 32c6a5e07a02709efac26c1d0b8d34cd855f66b0..f5bff6e08096d4cb204c6a534f8bbd2713c51614 100644
--- a/third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp
@@ -63,21 +63,16 @@ HTMLIFrameElementPermissions::parseDelegatedPermissions(
if (getPermissionType(tokens[i], &type)) {
permissions.push_back(type);
} else {
- if (numTokenErrors)
- tokenErrors.append(", '");
- else
- tokenErrors.append('\'');
+ tokenErrors.append(tokenErrors.isEmpty() ? "'" : ", '");
tokenErrors.append(tokens[i]);
- tokenErrors.append('\'');
+ tokenErrors.append("'");
++numTokenErrors;
}
}
if (numTokenErrors) {
- if (numTokenErrors > 1)
- tokenErrors.append(" are invalid permissions flags.");
- else
- tokenErrors.append(" is an invalid permissions flag.");
+ tokenErrors.append(numTokenErrors > 1 ? " are invalid permissions flags."
+ : " is an invalid permissions flag.");
invalidTokensErrorMessage = tokenErrors.toString();
}

Powered by Google App Engine
This is Rietveld 408576698