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

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

Issue 21185005: Expose a constructor for WebCryptoAlgorithm. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a factory method instead of constructor Created 7 years, 4 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 | « no previous file | public/platform/WebCryptoAlgorithm.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 WebCryptoAlgorithmId id; 49 WebCryptoAlgorithmId id;
50 const char* const name; 50 const char* const name;
51 OwnPtr<WebCryptoAlgorithmParams> params; 51 OwnPtr<WebCryptoAlgorithmParams> params;
52 }; 52 };
53 53
54 WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, const char* name , PassOwnPtr<WebCryptoAlgorithmParams> params) 54 WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, const char* name , PassOwnPtr<WebCryptoAlgorithmParams> params)
55 : m_private(adoptRef(new WebCryptoAlgorithmPrivate(id, name, params))) 55 : m_private(adoptRef(new WebCryptoAlgorithmPrivate(id, name, params)))
56 { 56 {
57 } 57 }
58 58
59 WebCryptoAlgorithm WebCryptoAlgorithm::adoptParamsAndCreate(WebCryptoAlgorithmId id, const char* name, WebCryptoAlgorithmParams* params)
60 {
61 return WebCryptoAlgorithm(id, name, adoptPtr(params));
62 }
63
59 WebCryptoAlgorithmId WebCryptoAlgorithm::id() const 64 WebCryptoAlgorithmId WebCryptoAlgorithm::id() const
60 { 65 {
61 return m_private->id; 66 return m_private->id;
62 } 67 }
63 68
64 const char* WebCryptoAlgorithm::name() const 69 const char* WebCryptoAlgorithm::name() const
65 { 70 {
66 return m_private->name; 71 return m_private->name;
67 } 72 }
68 73
(...skipping 29 matching lines...) Expand all
98 { 103 {
99 m_private = other.m_private; 104 m_private = other.m_private;
100 } 105 }
101 106
102 void WebCryptoAlgorithm::reset() 107 void WebCryptoAlgorithm::reset()
103 { 108 {
104 m_private.reset(); 109 m_private.reset();
105 } 110 }
106 111
107 } // namespace WebKit 112 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | public/platform/WebCryptoAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698