Chromium Code Reviews| Index: blimp/client/session/assignment_source.h |
| diff --git a/blimp/client/session/assignment_source.h b/blimp/client/session/assignment_source.h |
| index 9891d4a2d49c0d91cf1ffecfc4f2966bb9fd75ac..0c55c2d4b85962a0d3a146de993ffc890a1d7f20 100644 |
| --- a/blimp/client/session/assignment_source.h |
| +++ b/blimp/client/session/assignment_source.h |
| @@ -6,10 +6,15 @@ |
| #define BLIMP_CLIENT_SESSION_ASSIGNMENT_SOURCE_H_ |
| #include <string> |
| +#include <vector> |
| #include "base/callback.h" |
| +#include "base/files/file_path.h" |
| +#include "base/threading/thread.h" |
| #include "blimp/client/blimp_client_export.h" |
| -#include "net/base/ip_endpoint.h" |
| +#include "net/base/address_list.h" |
| +#include "net/base/hash_value.h" |
| +#include "net/cert/x509_certificate.h" |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -21,8 +26,14 @@ namespace client { |
| // An Assignment contains the configuration data needed for a client |
| // to connect to the engine. |
| struct BLIMP_CLIENT_EXPORT Assignment { |
| - net::IPEndPoint ip_endpoint; |
| + Assignment(); |
| + ~Assignment(); |
| + |
| + std::vector<net::IPAddress> ip_addresses; |
| + uint16_t tcp_port = 0; |
| + uint16_t ssl_port = 0; |
| std::string client_token; |
| + scoped_refptr<net::X509Certificate> cert; |
| }; |
| // AssignmentSource provides functionality to find out how a client should |
| @@ -36,15 +47,24 @@ class BLIMP_CLIENT_EXPORT AssignmentSource { |
| // thread. |
| AssignmentSource( |
| const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner); |
| - virtual ~AssignmentSource(); |
| + ~AssignmentSource(); |
| // Retrieves a valid assignment for the client and posts the result to the |
| // given callback. |
| void GetAssignment(const AssignmentCallback& callback); |
| private: |
| + // Gets the task runner for reading files on the IO thread. |
|
Wez
2016/02/18 00:40:50
Suggest "Returns the TaskRunner for |io_thread_|,
Kevin M
2016/02/18 23:35:47
Done.
|
| + scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner(); |
| + |
| scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| + // Thread for executing cert file reads. |
| + // TODO(kmarshall): Use BlimpClientSession IO thread task runner. |
| + // dtrainor@ will land a change that moves AssignmentSource into the |
| + // BlimpClientSession, which manages its own IO thread. |
| + scoped_ptr<base::Thread> io_thread_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AssignmentSource); |
| }; |