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

Unified Diff: components/webcrypto/webcrypto_util.cc

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/webcrypto_util.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/webcrypto_util.cc
diff --git a/content/child/webcrypto/webcrypto_util.cc b/components/webcrypto/webcrypto_util.cc
similarity index 96%
rename from content/child/webcrypto/webcrypto_util.cc
rename to components/webcrypto/webcrypto_util.cc
index 01536422e8bd11eb0e65e00eb0350ba5e6cff4bf..edc3cd5966ad432f0ca673c96d2ef74750545ee5 100644
--- a/content/child/webcrypto/webcrypto_util.cc
+++ b/components/webcrypto/webcrypto_util.cc
@@ -2,17 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/child/webcrypto/webcrypto_util.h"
+#include "components/webcrypto/webcrypto_util.h"
#include "base/logging.h"
#include "base/numerics/safe_math.h"
-#include "content/child/webcrypto/status.h"
+#include "components/webcrypto/status.h"
#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
#include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
#include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
-namespace content {
-
namespace webcrypto {
namespace {
@@ -242,10 +240,10 @@ Status VerifyUsagesBeforeImportAsymmetricKey(
// The JWK could represent either a public key or private key. The usages
// must make sense for one of the two. The usages will be checked again by
// ImportKeyJwk() once the key type has been determined.
- if (CheckKeyCreationUsages(
- all_public_key_usages, usages, true).IsError() &&
- CheckKeyCreationUsages(
- all_private_key_usages, usages, false).IsError()) {
+ if (CheckKeyCreationUsages(all_public_key_usages, usages, true)
+ .IsError() &&
+ CheckKeyCreationUsages(all_private_key_usages, usages, false)
+ .IsError()) {
return Status::ErrorCreateKeyBadUsages();
}
return Status::Success();
@@ -328,5 +326,3 @@ Status GetUsagesForGenerateAsymmetricKey(
}
} // namespace webcrypto
-
-} // namespace content
« no previous file with comments | « components/webcrypto/webcrypto_util.h ('k') | content/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698