| Index: remoting/protocol/pairing_registry.h
|
| diff --git a/remoting/protocol/pairing_registry.h b/remoting/protocol/pairing_registry.h
|
| index 354452438a046f7d7b7d5a29415ceb370aa1a961..e9bec6f205d96077af92943e5fc9217d673f597e 100644
|
| --- a/remoting/protocol/pairing_registry.h
|
| +++ b/remoting/protocol/pairing_registry.h
|
| @@ -14,6 +14,10 @@
|
| #include "base/threading/non_thread_safe.h"
|
| #include "base/time.h"
|
|
|
| +namespace base {
|
| +class TaskRunner;
|
| +} // namespace base
|
| +
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| @@ -88,14 +92,20 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry>,
|
|
|
| explicit PairingRegistry(scoped_ptr<Delegate> delegate);
|
|
|
| - // Create a pairing for a new client and save it to disk.
|
| + // Creates a pairing for a new client and saves it to disk.
|
| Pairing CreatePairing(const std::string& client_name);
|
|
|
| - // Get the pairing for the specified client id. See the corresponding
|
| + // Gets the pairing for the specified client id. See the corresponding
|
| // Delegate method for details.
|
| void GetPairing(const std::string& client_id,
|
| const GetPairingCallback& callback);
|
|
|
| + // Returns a platform-specific Delegate that will save to permanent storage
|
| + // using the specified TaskRunner. Returns NULL on platforms that don't
|
| + // support pairing.
|
| + static scoped_ptr<Delegate> CreateDelegate(
|
| + scoped_refptr<base::TaskRunner> task_runner);
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<PairingRegistry>;
|
|
|
| @@ -106,18 +116,6 @@ class PairingRegistry : public base::RefCountedThreadSafe<PairingRegistry>,
|
| DISALLOW_COPY_AND_ASSIGN(PairingRegistry);
|
| };
|
|
|
| -// Temporary delegate that just logs NOTIMPLEMENTED for Load/Save.
|
| -// TODO(jamiewalch): Delete once Delegates are implemented for all platforms.
|
| -class NotImplementedPairingRegistryDelegate : public PairingRegistry::Delegate {
|
| - public:
|
| - virtual void AddPairing(
|
| - const PairingRegistry::Pairing& paired_clients,
|
| - const PairingRegistry::AddPairingCallback& callback) OVERRIDE;
|
| - virtual void GetPairing(
|
| - const std::string& client_id,
|
| - const PairingRegistry::GetPairingCallback& callback) OVERRIDE;
|
| -};
|
| -
|
| } // namespace protocol
|
| } // namespace remoting
|
|
|
|
|