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

Unified Diff: content/renderer/webcrypto/webcrypto_impl.cc

Issue 138953016: [style] Remove braces from single-line if statements for style consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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: content/renderer/webcrypto/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc
index e90a7f1ad7d6bd108ee57c68152e968357bd825b..5f14fac88a63265fde2fbfb0070ce156e09e6615 100644
--- a/content/renderer/webcrypto/webcrypto_impl.cc
+++ b/content/renderer/webcrypto/webcrypto_impl.cc
@@ -183,11 +183,10 @@ void WebCryptoImpl::encrypt(
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = EncryptInternal(algorithm, key, data, data_size, &buffer);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBuffer(buffer);
- }
}
void WebCryptoImpl::decrypt(
@@ -199,11 +198,10 @@ void WebCryptoImpl::decrypt(
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = DecryptInternal(algorithm, key, data, data_size, &buffer);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBuffer(buffer);
- }
}
void WebCryptoImpl::digest(
@@ -214,11 +212,10 @@ void WebCryptoImpl::digest(
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = DigestInternal(algorithm, data, data_size, &buffer);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBuffer(buffer);
- }
}
void WebCryptoImpl::generateKey(
@@ -303,11 +300,10 @@ void WebCryptoImpl::exportKey(
blink::WebCryptoResult result) {
blink::WebArrayBuffer buffer;
Status status = ExportKeyInternal(format, key, &buffer);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBuffer(buffer);
- }
}
void WebCryptoImpl::sign(
@@ -319,11 +315,10 @@ void WebCryptoImpl::sign(
DCHECK(!algorithm.isNull());
blink::WebArrayBuffer buffer;
Status status = SignInternal(algorithm, key, data, data_size, &buffer);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBuffer(buffer);
- }
}
void WebCryptoImpl::verifySignature(
@@ -343,11 +338,10 @@ void WebCryptoImpl::verifySignature(
data,
data_size,
&signature_match);
- if (status.IsError()) {
+ if (status.IsError())
CompleteWithError(status, &result);
- } else {
+ else
result.completeWithBoolean(signature_match);
- }
}
Status WebCryptoImpl::ImportKeyJwk(
« no previous file with comments | « no previous file | content/renderer/webcrypto/webcrypto_impl_nss.cc » ('j') | content/renderer/webcrypto/webcrypto_impl_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698