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

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

Issue 348493005: Revert of [webcrypto] Give more descriptive error messages on Linux for unsupported functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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') | no next file » | 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return Status(blink::WebCryptoErrorTypeData, 144 return Status(blink::WebCryptoErrorTypeData,
145 "The provided data is too large"); 145 "The provided data is too large");
146 } 146 }
147 147
148 Status Status::ErrorDataTooSmall() { 148 Status Status::ErrorDataTooSmall() {
149 return Status(blink::WebCryptoErrorTypeData, 149 return Status(blink::WebCryptoErrorTypeData,
150 "The provided data is too small"); 150 "The provided data is too small");
151 } 151 }
152 152
153 Status Status::ErrorUnsupported() { 153 Status Status::ErrorUnsupported() {
154 return ErrorUnsupported("The requested operation is unsupported"); 154 return Status(blink::WebCryptoErrorTypeNotSupported,
155 } 155 "The requested operation is unsupported");
156
157 Status Status::ErrorUnsupported(const std::string& message) {
158 return Status(blink::WebCryptoErrorTypeNotSupported, message);
159 } 156 }
160 157
161 Status Status::ErrorUnexpected() { 158 Status Status::ErrorUnexpected() {
162 return Status(blink::WebCryptoErrorTypeUnknown, 159 return Status(blink::WebCryptoErrorTypeUnknown,
163 "Something unexpected happened..."); 160 "Something unexpected happened...");
164 } 161 }
165 162
166 Status Status::ErrorInvalidAesGcmTagLength() { 163 Status Status::ErrorInvalidAesGcmTagLength() {
167 return Status( 164 return Status(
168 blink::WebCryptoErrorTypeData, 165 blink::WebCryptoErrorTypeData,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 error_type_(error_type), 214 error_type_(error_type),
218 error_details_(error_details_utf8) { 215 error_details_(error_details_utf8) {
219 } 216 }
220 217
221 Status::Status(Type type) : type_(type) { 218 Status::Status(Type type) : type_(type) {
222 } 219 }
223 220
224 } // namespace webcrypto 221 } // namespace webcrypto
225 222
226 } // namespace content 223 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698