Commit 72f9045d authored by Jason Chase's avatar Jason Chase Committed by Commit Bot

Use consistent param order for AddTokens

Minor refactor to have all AddToken* methods have |token(s)| as the
first parameter. Split off from http://crrev.com/c/2173473.

Bug: 1073920
Change-Id: Icbb2699849e74743e7584f981aa831e407134986
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2261634Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Jason Chase <chasej@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782058}
parent 58c13e69
......@@ -354,8 +354,8 @@ void SecurityContextInit::InitializeOriginTrials(
if (!tokens)
return;
origin_trials_->AddTokens(
security_origin_.get(),
secure_context_mode_ == SecureContextMode::kSecureContext, *tokens);
*tokens, security_origin_.get(),
secure_context_mode_ == SecureContextMode::kSecureContext);
}
} // namespace blink
......@@ -267,12 +267,12 @@ void OriginTrialContext::AddTokenInternal(const String& token,
}
void OriginTrialContext::AddTokens(const Vector<String>& tokens) {
AddTokens(GetSecurityOrigin(), IsSecureContext(), tokens);
AddTokens(tokens, GetSecurityOrigin(), IsSecureContext());
}
void OriginTrialContext::AddTokens(const SecurityOrigin* origin,
bool is_secure,
const Vector<String>& tokens) {
void OriginTrialContext::AddTokens(const Vector<String>& tokens,
const SecurityOrigin* origin,
bool is_secure) {
if (tokens.IsEmpty())
return;
bool found_valid = false;
......
......@@ -79,9 +79,9 @@ class CORE_EXPORT OriginTrialContext final
void AddTokenFromExternalScript(const String& token,
const SecurityOrigin* origin);
void AddTokens(const Vector<String>& tokens);
void AddTokens(const SecurityOrigin* origin,
bool is_secure,
const Vector<String>& tokens);
void AddTokens(const Vector<String>& tokens,
const SecurityOrigin* origin,
bool is_secure);
void ActivateNavigationFeaturesFromInitiator(
const Vector<OriginTrialFeature>& features);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment