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

Unified Diff: blimp/net/engine_authentication_handler.cc

Issue 2281783002: Changes client_token to be client_auth_token. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: blimp/net/engine_authentication_handler.cc
diff --git a/blimp/net/engine_authentication_handler.cc b/blimp/net/engine_authentication_handler.cc
index 1cc50b2a9c41660b0d2a90f7bc73955190459edf..4e8917d80f8664ceb90c7028aeda291eda7ee99e 100644
--- a/blimp/net/engine_authentication_handler.cc
+++ b/blimp/net/engine_authentication_handler.cc
@@ -37,7 +37,7 @@ class Authenticator : public ConnectionErrorObserver,
public:
explicit Authenticator(std::unique_ptr<BlimpConnection> connection,
base::WeakPtr<ConnectionHandler> connection_handler,
- const std::string& client_token);
+ const std::string& client_auth_token);
~Authenticator() override;
private:
@@ -61,7 +61,7 @@ class Authenticator : public ConnectionErrorObserver,
base::WeakPtr<ConnectionHandler> connection_handler_;
// Used to authenticate incoming connection.
- const std::string client_token_;
+ const std::string client_auth_token_;
// A timer to fail authentication on timeout.
base::OneShotTimer timeout_timer_;
@@ -72,10 +72,10 @@ class Authenticator : public ConnectionErrorObserver,
Authenticator::Authenticator(
std::unique_ptr<BlimpConnection> connection,
base::WeakPtr<ConnectionHandler> connection_handler,
- const std::string& client_token)
+ const std::string& client_auth_token)
: connection_(std::move(connection)),
connection_handler_(connection_handler),
- client_token_(client_token) {
+ client_auth_token_(client_auth_token) {
DVLOG(1) << "Authenticator object created.";
// Observe for errors that might occur during the authentication phase.
@@ -142,9 +142,10 @@ void Authenticator::ProcessMessage(std::unique_ptr<BlimpMessage> message,
}
// Verify that the authentication token matches.
- bool token_match = client_token_ == start_connection.client_token();
+ bool token_match =
+ client_auth_token_ == start_connection.client_auth_token();
DVLOG(1) << "Authentication challenge received: "
- << start_connection.client_token() << ", and token "
+ << start_connection.client_auth_token() << ", and token "
<< (token_match ? " matches" : " does not match");
OnConnectionAuthenticated(token_match);
}
@@ -153,10 +154,10 @@ void Authenticator::ProcessMessage(std::unique_ptr<BlimpMessage> message,
EngineAuthenticationHandler::EngineAuthenticationHandler(
ConnectionHandler* connection_handler,
- const std::string& client_token)
+ const std::string& client_auth_token)
: connection_handler_weak_factory_(connection_handler),
- client_token_(client_token) {
- DCHECK(!client_token_.empty());
+ client_auth_token_(client_auth_token) {
+ DCHECK(!client_auth_token_.empty());
}
EngineAuthenticationHandler::~EngineAuthenticationHandler() {}
@@ -166,7 +167,7 @@ void EngineAuthenticationHandler::HandleConnection(
// Authenticator manages its own lifetime.
new Authenticator(std::move(connection),
connection_handler_weak_factory_.GetWeakPtr(),
- client_token_);
+ client_auth_token_);
}
} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698