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

Unified Diff: components/webcrypto/jwk.h

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/generate_key_result.cc ('k') | components/webcrypto/jwk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/jwk.h
diff --git a/content/child/webcrypto/jwk.h b/components/webcrypto/jwk.h
similarity index 93%
rename from content/child/webcrypto/jwk.h
rename to components/webcrypto/jwk.h
index 7cd603cfb6fb8acff70fc34d91b49e7860ff4648..8c548acb9e3ebbfd461d7d3745ffe539e0a637f9 100644
--- a/content/child/webcrypto/jwk.h
+++ b/components/webcrypto/jwk.h
@@ -2,19 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_CHILD_WEBCRYPTO_JWK_H_
-#define CONTENT_CHILD_WEBCRYPTO_JWK_H_
+#ifndef COMPONENTS_WEBCRYPTO_JWK_H_
+#define COMPONENTS_WEBCRYPTO_JWK_H_
#include <stdint.h>
#include <vector>
#include "base/strings/string_piece.h"
#include "base/values.h"
-#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebCrypto.h"
-namespace content {
-
namespace webcrypto {
class CryptoData;
@@ -233,23 +230,19 @@ const char* GetJwkHmacAlgorithmName(blink::WebCryptoAlgorithmId hash);
// https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-36#section-2
//
// In essence it is RFC 4648 'base64url' encoding where padding is omitted.
-CONTENT_EXPORT bool Base64DecodeUrlSafe(const std::string& input,
- std::string* output);
+bool Base64DecodeUrlSafe(const std::string& input, std::string* output);
// Encodes |input| using JWK's flavor of base64 encoding. See the description
// above for details.
-CONTENT_EXPORT std::string Base64EncodeUrlSafe(const base::StringPiece& input);
-CONTENT_EXPORT std::string Base64EncodeUrlSafe(
- const std::vector<uint8_t>& input);
+std::string Base64EncodeUrlSafe(const base::StringPiece& input);
+std::string Base64EncodeUrlSafe(const std::vector<uint8_t>& input);
// Converts a JWK "key_ops" array to the corresponding WebCrypto usages. Used by
// testing.
-CONTENT_EXPORT Status
-GetWebCryptoUsagesFromJwkKeyOpsForTest(const base::ListValue* key_ops,
- blink::WebCryptoKeyUsageMask* usages);
+Status GetWebCryptoUsagesFromJwkKeyOpsForTest(
+ const base::ListValue* key_ops,
+ blink::WebCryptoKeyUsageMask* usages);
} // namespace webcrypto
-} // namespace content
-
-#endif // CONTENT_CHILD_WEBCRYPTO_JWK_H_
+#endif // COMPONENTS_WEBCRYPTO_JWK_H_
« no previous file with comments | « components/webcrypto/generate_key_result.cc ('k') | components/webcrypto/jwk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698