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

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

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 | « no previous file | public/platform/WebCryptoKey.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 { 98 {
99 ASSERT(!isNull()); 99 ASSERT(!isNull());
100 return m_private->usages; 100 return m_private->usages;
101 } 101 }
102 102
103 bool WebCryptoKey::isNull() const 103 bool WebCryptoKey::isNull() const
104 { 104 {
105 return m_private.isNull(); 105 return m_private.isNull();
106 } 106 }
107 107
108 bool WebCryptoKey::keyUsageAllows(const blink::WebCryptoKeyUsage usage) const
109 {
110 return ((m_private->usages & usage) != 0);
111 }
112
108 void WebCryptoKey::assign(const WebCryptoKey& other) 113 void WebCryptoKey::assign(const WebCryptoKey& other)
109 { 114 {
110 m_private = other.m_private; 115 m_private = other.m_private;
111 } 116 }
112 117
113 void WebCryptoKey::reset() 118 void WebCryptoKey::reset()
114 { 119 {
115 m_private.reset(); 120 m_private.reset();
116 } 121 }
117 122
118 } // namespace blink 123 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/platform/WebCryptoKey.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698