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

Unified Diff: remoting/host/token_validator_factory_impl.h

Issue 165293004: Refactor TokenValidatorImpl into a base class + implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 | « remoting/host/token_validator_base.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/token_validator_factory_impl.h
diff --git a/remoting/host/token_validator_factory_impl.h b/remoting/host/token_validator_factory_impl.h
index b8fbb0fb7a0f43d0a13029582d5e07e1fdd192c1..10ffd64d0d62b8afd3fbe7baf279052ee312953a 100644
--- a/remoting/host/token_validator_factory_impl.h
+++ b/remoting/host/token_validator_factory_impl.h
@@ -10,29 +10,15 @@
#include "base/basictypes.h"
#include "net/url_request/url_request_context_getter.h"
-#include "remoting/protocol/third_party_host_authenticator.h"
+#include "remoting/host/token_validator_base.h"
+#include "remoting/protocol/token_validator.h"
namespace remoting {
-struct ThirdPartyAuthConfig {
- inline bool is_empty() const {
- return token_url.is_empty() && token_validation_url.is_empty();
- }
-
- inline bool is_valid() const {
- return token_url.is_valid() && token_validation_url.is_valid();
- }
-
- GURL token_url;
- GURL token_validation_url;
- std::string token_validation_cert_issuer;
-};
-
// This class dispenses |TokenValidator| implementations that use a UrlFetcher
// to contact a |token_validation_url| and exchange the |token| for a
// |shared_secret|.
-class TokenValidatorFactoryImpl
- : public protocol::ThirdPartyHostAuthenticator::TokenValidatorFactory {
+class TokenValidatorFactoryImpl : public protocol::TokenValidatorFactory {
public:
// Creates a new factory. |token_url| and |token_validation_url| are the
// third party authentication service URLs, obtained via policy. |key_pair_|
@@ -45,9 +31,9 @@ class TokenValidatorFactoryImpl
virtual ~TokenValidatorFactoryImpl();
// TokenValidatorFactory interface.
- virtual scoped_ptr<protocol::ThirdPartyHostAuthenticator::TokenValidator>
- CreateTokenValidator(const std::string& local_jid,
- const std::string& remote_jid) OVERRIDE;
+ virtual scoped_ptr<protocol::TokenValidator> CreateTokenValidator(
+ const std::string& local_jid,
+ const std::string& remote_jid) OVERRIDE;
private:
ThirdPartyAuthConfig third_party_auth_config_;
« no previous file with comments | « remoting/host/token_validator_base.cc ('k') | remoting/host/token_validator_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698