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

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: Rebase 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
« no previous file with comments | « no previous file | content/renderer/webcrypto/webcrypto_impl_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc
index e3f5816748283cce5bc09ae37c7de84e207ae463..1f20b4410a1252d5571138b3dcb33568aeb1bed7 100644
--- a/content/renderer/webcrypto/webcrypto_impl.cc
+++ b/content/renderer/webcrypto/webcrypto_impl.cc
@@ -184,11 +184,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(
@@ -200,11 +199,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(
@@ -215,11 +213,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(
@@ -304,11 +301,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(
@@ -320,11 +316,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(
@@ -344,11 +339,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698