Chromium Code Reviews| Index: blimp/client/session/assignment_source.cc |
| diff --git a/blimp/client/session/assignment_source.cc b/blimp/client/session/assignment_source.cc |
| index f22e5543af848f42510e254a9e599676bae33beb..092a6dfd4b60c359552d9faf9fbc9c37ea06ef92 100644 |
| --- a/blimp/client/session/assignment_source.cc |
| +++ b/blimp/client/session/assignment_source.cc |
| @@ -15,8 +15,10 @@ |
| #include "base/numerics/safe_conversions.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/task_runner_util.h" |
| +#include "base/threading/thread_restrictions.h" |
| #include "base/values.h" |
| #include "blimp/client/app/blimp_client_switches.h" |
| +#include "blimp/common/get_client_token.h" |
| #include "blimp/common/protocol_version.h" |
| #include "components/safe_json/safe_json_parser.h" |
| #include "net/base/ip_address.h" |
| @@ -99,7 +101,8 @@ bool IsValidIpPortNumber(unsigned port) { |
| // Must be called on a thread suitable for file IO. |
| Assignment GetAssignmentFromCommandLine() { |
| Assignment assignment; |
| - assignment.client_token = kDummyClientToken; |
| + const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| + assignment.client_token = GetClientToken(*cmd_line); |
|
Kevin M
2016/05/10 18:06:34
Add newline before this line, to visually separate
Kevin M
2016/05/10 18:06:34
What's the behavior if the token isn't specified?
Kevin M
2016/05/10 18:06:34
You can just pass the result of ForCurrentProcess(
CJ
2016/05/10 20:58:06
Done.
CJ
2016/05/10 20:58:06
Adding an assert here such that client_token does
CJ
2016/05/10 20:58:06
Keeping it, since in a later comment, you suggest
|
| unsigned port_parsed = 0; |
| if (!base::StringToUint( |