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

Side by Side Diff: content/child/webcrypto/status.cc

Issue 253123002: [refactor] Remove usages of WEBCRYPTO_HAS_ERROR_TYPE ifdef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase now that threads is reverted... Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/webcrypto/status.h" 5 #include "content/child/webcrypto/status.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 namespace webcrypto { 9 namespace webcrypto {
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 "The JWK \"k\" property did not include the right length " 115 "The JWK \"k\" property did not include the right length "
116 "of key data for the given algorithm."); 116 "of key data for the given algorithm.");
117 } 117 }
118 118
119 Status Status::ErrorImportEmptyKeyData() { 119 Status Status::ErrorImportEmptyKeyData() {
120 return Status(blink::WebCryptoErrorTypeData, "No key data was provided"); 120 return Status(blink::WebCryptoErrorTypeData, "No key data was provided");
121 } 121 }
122 122
123 Status Status::ErrorImportAesKeyLength() { 123 Status Status::ErrorImportAesKeyLength() {
124 return Status(blink::WebCryptoErrorTypeData, 124 return Status(blink::WebCryptoErrorTypeData,
125 #if defined(WEBCRYPTO_HAS_ERROR_TYPE)
126 "AES key data must be 128, 192 or 256 bits"); 125 "AES key data must be 128, 192 or 256 bits");
127 #else
128 "");
129 #endif
130 } 126 }
131 127
132 Status Status::ErrorUnexpectedKeyType() { 128 Status Status::ErrorUnexpectedKeyType() {
133 return Status(blink::WebCryptoErrorTypeInvalidAccess, 129 return Status(blink::WebCryptoErrorTypeInvalidAccess,
134 "The key is not of the expected type"); 130 "The key is not of the expected type");
135 } 131 }
136 132
137 Status Status::ErrorIncorrectSizeAesCbcIv() { 133 Status Status::ErrorIncorrectSizeAesCbcIv() {
138 return Status(blink::WebCryptoErrorTypeData, 134 return Status(blink::WebCryptoErrorTypeData,
139 "The \"iv\" has an unexpected length -- must be 16 bytes"); 135 "The \"iv\" has an unexpected length -- must be 16 bytes");
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 error_type_(error_type), 204 error_type_(error_type),
209 error_details_(error_details_utf8) { 205 error_details_(error_details_utf8) {
210 } 206 }
211 207
212 Status::Status(Type type) : type_(type) { 208 Status::Status(Type type) : type_(type) {
213 } 209 }
214 210
215 } // namespace webcrypto 211 } // namespace webcrypto
216 212
217 } // namespace content 213 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698