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

Unified Diff: remoting/protocol/token_validator.h

Issue 1788443005: Make TokenValidatorFactory ref-counted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/protocol/negotiating_host_authenticator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/token_validator.h
diff --git a/remoting/protocol/token_validator.h b/remoting/protocol/token_validator.h
index 70540c77418af93ecb06edeced2d0b9aa3f58e58..12af22d5f47173f3aebf38057fe83f2217f131b3 100644
--- a/remoting/protocol/token_validator.h
+++ b/remoting/protocol/token_validator.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/callback.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "url/gurl.h"
@@ -48,15 +49,19 @@ class TokenValidator {
};
// Factory for |TokenValidator|.
-class TokenValidatorFactory {
+class TokenValidatorFactory
+ : public base::RefCountedThreadSafe<TokenValidatorFactory> {
public:
- virtual ~TokenValidatorFactory() {}
-
// Creates a TokenValidator. |local_jid| and |remote_jid| are used to create
// a token scope that is restricted to the current connection's JIDs.
virtual scoped_ptr<TokenValidator> CreateTokenValidator(
const std::string& local_jid,
const std::string& remote_jid) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<TokenValidatorFactory>;
+
+ virtual ~TokenValidatorFactory() {}
};
} // namespace protocol
« no previous file with comments | « remoting/protocol/negotiating_host_authenticator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698