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

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

Issue 23617006: WebCrypto: Add the KeyPair interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase onto master Created 7 years, 3 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 | « LayoutTests/crypto/generateKey-expected.txt ('k') | Source/modules/crypto/CryptoResult.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) 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 m_impl->completeWithKey(key); 69 m_impl->completeWithKey(key);
70 reset(); 70 reset();
71 } 71 }
72 72
73 void WebCryptoResult::completeWithKeyPair(const WebCryptoKey& publicKey, const W ebCryptoKey& privateKey)
74 {
75 m_impl->completeWithKeyPair(publicKey, privateKey);
76 reset();
77 }
78
73 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i mpl) 79 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i mpl)
74 : m_impl(impl) 80 : m_impl(impl)
75 { 81 {
76 ASSERT(impl); 82 ASSERT(impl);
77 } 83 }
78 84
79 void WebCryptoResult::reset() 85 void WebCryptoResult::reset()
80 { 86 {
81 m_impl.reset(); 87 m_impl.reset();
82 } 88 }
83 89
84 void WebCryptoResult::assign(const WebCryptoResult& o) 90 void WebCryptoResult::assign(const WebCryptoResult& o)
85 { 91 {
86 m_impl = o.m_impl; 92 m_impl = o.m_impl;
87 } 93 }
88 94
89 } // namespace WebKit 95 } // namespace WebKit
OLDNEW
« no previous file with comments | « LayoutTests/crypto/generateKey-expected.txt ('k') | Source/modules/crypto/CryptoResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698