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

Side by Side Diff: third_party/WebKit/Source/modules/crypto/CryptoKey.cpp

Issue 2879773002: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in modules Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 virtual void SetString(const char* property_name, const char* value) { 103 virtual void SetString(const char* property_name, const char* value) {
104 builder_.AddString(property_name, value); 104 builder_.AddString(property_name, value);
105 } 105 }
106 106
107 virtual void SetUint(const char* property_name, unsigned value) { 107 virtual void SetUint(const char* property_name, unsigned value) {
108 builder_.AddNumber(property_name, value); 108 builder_.AddNumber(property_name, value);
109 } 109 }
110 110
111 virtual void SetAlgorithm(const char* property_name, 111 virtual void SetAlgorithm(const char* property_name,
112 const WebCryptoAlgorithm& algorithm) { 112 const WebCryptoAlgorithm& algorithm) {
113 ASSERT(algorithm.ParamsType() == kWebCryptoAlgorithmParamsTypeNone); 113 DCHECK_EQ(algorithm.ParamsType(), kWebCryptoAlgorithmParamsTypeNone);
114 114
115 V8ObjectBuilder algorithm_value(builder_.GetScriptState()); 115 V8ObjectBuilder algorithm_value(builder_.GetScriptState());
116 algorithm_value.AddString( 116 algorithm_value.AddString(
117 "name", WebCryptoAlgorithm::LookupAlgorithmInfo(algorithm.Id())->name); 117 "name", WebCryptoAlgorithm::LookupAlgorithmInfo(algorithm.Id())->name);
118 builder_.Add(property_name, algorithm_value); 118 builder_.Add(property_name, algorithm_value);
119 } 119 }
120 120
121 virtual void SetUint8Array(const char* property_name, 121 virtual void SetUint8Array(const char* property_name,
122 const WebVector<unsigned char>& vector) { 122 const WebVector<unsigned char>& vector) {
123 builder_.Add(property_name, 123 builder_.Add(property_name,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 result->CompleteWithError(kWebCryptoErrorTypeType, 231 result->CompleteWithError(kWebCryptoErrorTypeType,
232 "Invalid keyUsages argument"); 232 "Invalid keyUsages argument");
233 return false; 233 return false;
234 } 234 }
235 mask |= usage; 235 mask |= usage;
236 } 236 }
237 return true; 237 return true;
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698