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

Side by Side Diff: content/browser/webauth/authenticator_impl.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/webauth/authenticator_impl.h" 5 #include "content/browser/webauth/authenticator_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void AuthenticatorImpl::MakeCredential( 54 void AuthenticatorImpl::MakeCredential(
55 webauth::mojom::MakeCredentialOptionsPtr options, 55 webauth::mojom::MakeCredentialOptionsPtr options,
56 MakeCredentialCallback callback) { 56 MakeCredentialCallback callback) {
57 std::string effective_domain; 57 std::string effective_domain;
58 std::string relying_party_id; 58 std::string relying_party_id;
59 std::string client_data_json; 59 std::string client_data_json;
60 base::DictionaryValue client_data; 60 base::DictionaryValue client_data;
61 61
62 // Steps 6 & 7 of https://w3c.github.io/webauthn/#createCredential 62 // Steps 6 & 7 of https://w3c.github.io/webauthn/#createCredential
63 // opaque origin 63 // opaque origin
64 if (caller_origin_.unique()) { 64 if (caller_origin_.opaque()) {
65 std::move(callback).Run( 65 std::move(callback).Run(
66 webauth::mojom::AuthenticatorStatus::NOT_ALLOWED_ERROR, NULL); 66 webauth::mojom::AuthenticatorStatus::NOT_ALLOWED_ERROR, NULL);
67 return; 67 return;
68 } 68 }
69 69
70 if (options->relying_party->id.empty()) { 70 if (options->relying_party->id.empty()) {
71 relying_party_id = caller_origin_.Serialize(); 71 relying_party_id = caller_origin_.Serialize();
72 } else { 72 } else {
73 effective_domain = caller_origin_.host(); 73 effective_domain = caller_origin_.host();
74 74
(...skipping 22 matching lines...) Expand all
97 97
98 // SHA-256 hash the JSON data structure 98 // SHA-256 hash the JSON data structure
99 client_data_json = SerializeValueToJson(client_data); 99 client_data_json = SerializeValueToJson(client_data);
100 std::string client_data_hash = crypto::SHA256HashString(client_data_json); 100 std::string client_data_hash = crypto::SHA256HashString(client_data_json);
101 101
102 std::move(callback).Run(webauth::mojom::AuthenticatorStatus::NOT_IMPLEMENTED, 102 std::move(callback).Run(webauth::mojom::AuthenticatorStatus::NOT_IMPLEMENTED,
103 nullptr); 103 nullptr);
104 } 104 }
105 105
106 } // namespace content 106 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/child/blink_platform_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698