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

Side by Side Diff: public/platform/WebCryptoKey.h

Issue 1184123007: move KeyUsageAllows to more logical place(part1) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed as suggested Created 5 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
« no previous file with comments | « Source/platform/exported/WebCryptoKey.cpp ('k') | no next file » | 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // * Returned pointer's lifetime is bound to |this| 113 // * Returned pointer's lifetime is bound to |this|
114 BLINK_PLATFORM_EXPORT WebCryptoKeyHandle* handle() const; 114 BLINK_PLATFORM_EXPORT WebCryptoKeyHandle* handle() const;
115 115
116 BLINK_PLATFORM_EXPORT WebCryptoKeyType type() const; 116 BLINK_PLATFORM_EXPORT WebCryptoKeyType type() const;
117 BLINK_PLATFORM_EXPORT bool extractable() const; 117 BLINK_PLATFORM_EXPORT bool extractable() const;
118 BLINK_PLATFORM_EXPORT const WebCryptoKeyAlgorithm& algorithm() const; 118 BLINK_PLATFORM_EXPORT const WebCryptoKeyAlgorithm& algorithm() const;
119 BLINK_PLATFORM_EXPORT WebCryptoKeyUsageMask usages() const; 119 BLINK_PLATFORM_EXPORT WebCryptoKeyUsageMask usages() const;
120 120
121 BLINK_PLATFORM_EXPORT bool isNull() const; 121 BLINK_PLATFORM_EXPORT bool isNull() const;
122 122
123 BLINK_PLATFORM_EXPORT bool keyUsageAllows(const blink::WebCryptoKeyUsage) co nst;
124
123 private: 125 private:
124 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other); 126 BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other);
125 BLINK_PLATFORM_EXPORT void reset(); 127 BLINK_PLATFORM_EXPORT void reset();
126 128
127 WebPrivatePtr<WebCryptoKeyPrivate> m_private; 129 WebPrivatePtr<WebCryptoKeyPrivate> m_private;
128 }; 130 };
129 131
130 // Base class for the embedder to define its own opaque key handle. The lifetime 132 // Base class for the embedder to define its own opaque key handle. The lifetime
131 // of this object is controlled by WebCryptoKey using reference counting. 133 // of this object is controlled by WebCryptoKey using reference counting.
132 class WebCryptoKeyHandle { 134 class WebCryptoKeyHandle {
133 public: 135 public:
134 virtual ~WebCryptoKeyHandle() { } 136 virtual ~WebCryptoKeyHandle() { }
135 }; 137 };
136 138
137 } // namespace blink 139 } // namespace blink
138 140
139 #endif 141 #endif
OLDNEW
« no previous file with comments | « Source/platform/exported/WebCryptoKey.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698