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..31e25b9829f4340f662f05072e946014a9371281 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" |
|
Ryan Sleevi
2016/02/19 22:56:08
Unused
Kevin M
2016/02/22 22:53:31
Done.
|
| +#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" |
|
Ryan Sleevi
2016/02/19 22:56:08
Unused
Kevin M
2016/02/22 22:53:31
Done.
|
| +#include "net/cert/x509_certificate.h" |
|
Ryan Sleevi
2016/02/19 22:56:08
Can forward declare
Kevin M
2016/02/22 22:53:31
Done.
|
| 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; |
|
Ryan Sleevi
2016/02/19 22:56:08
STYLE: Document this. It took me a while of readin
Kevin M
2016/02/22 22:53:31
Agreed that multiple addresses contribute to ambig
|
| + 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: |
| + // Returns the TaskRunner for the |io_thread_|. |
| + 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); |
| }; |