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

Side by Side Diff: Source/core/platform/chromium/support/WebCrypto.cpp

Issue 48753003: [webcrypto] Make WebCryptoKey nullable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « no previous file | Source/platform/exported/WebCryptoKey.cpp » ('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) 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 void WebCryptoResult::completeWithBoolean(bool b) 61 void WebCryptoResult::completeWithBoolean(bool b)
62 { 62 {
63 m_impl->completeWithBoolean(b); 63 m_impl->completeWithBoolean(b);
64 reset(); 64 reset();
65 } 65 }
66 66
67 void WebCryptoResult::completeWithKey(const WebCryptoKey& key) 67 void WebCryptoResult::completeWithKey(const WebCryptoKey& key)
68 { 68 {
69 ASSERT(!key.isNull());
69 m_impl->completeWithKey(key); 70 m_impl->completeWithKey(key);
70 reset(); 71 reset();
71 } 72 }
72 73
73 void WebCryptoResult::completeWithKeyPair(const WebCryptoKey& publicKey, const W ebCryptoKey& privateKey) 74 void WebCryptoResult::completeWithKeyPair(const WebCryptoKey& publicKey, const W ebCryptoKey& privateKey)
74 { 75 {
76 ASSERT(!publicKey.isNull());
77 ASSERT(!privateKey.isNull());
75 m_impl->completeWithKeyPair(publicKey, privateKey); 78 m_impl->completeWithKeyPair(publicKey, privateKey);
76 reset(); 79 reset();
77 } 80 }
78 81
79 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i mpl) 82 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i mpl)
80 : m_impl(impl) 83 : m_impl(impl)
81 { 84 {
82 ASSERT(m_impl.get()); 85 ASSERT(m_impl.get());
83 } 86 }
84 87
85 void WebCryptoResult::reset() 88 void WebCryptoResult::reset()
86 { 89 {
87 m_impl.reset(); 90 m_impl.reset();
88 } 91 }
89 92
90 void WebCryptoResult::assign(const WebCryptoResult& o) 93 void WebCryptoResult::assign(const WebCryptoResult& o)
91 { 94 {
92 m_impl = o.m_impl; 95 m_impl = o.m_impl;
93 } 96 }
94 97
95 } // namespace WebKit 98 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | Source/platform/exported/WebCryptoKey.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698