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

Side by Side Diff: Source/platform/exported/WebCryptoKeyAlgorithm.cpp

Issue 340353006: [webcrypto] Replace KeyAlgorithm interfaces with an Object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove const reference and make v8value a value Created 6 years, 5 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 | « Source/modules/modules.gypi ('k') | public/platform/WebCryptoKeyAlgorithm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::rsaHashedParams() c onst 126 WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::rsaHashedParams() c onst
127 { 127 {
128 ASSERT(!isNull()); 128 ASSERT(!isNull());
129 if (paramsType() == WebCryptoKeyAlgorithmParamsTypeRsaHashed) 129 if (paramsType() == WebCryptoKeyAlgorithmParamsTypeRsaHashed)
130 return static_cast<WebCryptoRsaHashedKeyAlgorithmParams*>(m_private->par ams.get()); 130 return static_cast<WebCryptoRsaHashedKeyAlgorithmParams*>(m_private->par ams.get());
131 return 0; 131 return 0;
132 } 132 }
133 133
134 void WebCryptoKeyAlgorithm::writeToDictionary(WebCryptoKeyAlgorithmDictionary* d ict) const
135 {
136 ASSERT(!isNull());
137 dict->setString("name", WebCryptoAlgorithm::lookupAlgorithmInfo(id())->name) ;
138 m_private->params.get()->writeToDictionary(dict);
139 }
140
134 void WebCryptoKeyAlgorithm::assign(const WebCryptoKeyAlgorithm& other) 141 void WebCryptoKeyAlgorithm::assign(const WebCryptoKeyAlgorithm& other)
135 { 142 {
136 m_private = other.m_private; 143 m_private = other.m_private;
137 } 144 }
138 145
139 void WebCryptoKeyAlgorithm::reset() 146 void WebCryptoKeyAlgorithm::reset()
140 { 147 {
141 m_private.reset(); 148 m_private.reset();
142 } 149 }
143 150
144 } // namespace blink 151 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | public/platform/WebCryptoKeyAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698