Chromium Code Reviews| Index: tools/battor_agent/battor_agent.cc |
| diff --git a/tools/battor_agent/battor_agent.cc b/tools/battor_agent/battor_agent.cc |
| index 6fc6ea17983b09ed662e617b9906fc6c3dbc2f94..3c4456fb051e3051b2ae1c70a93f390747269629 100644 |
| --- a/tools/battor_agent/battor_agent.cc |
| +++ b/tools/battor_agent/battor_agent.cc |
| @@ -159,6 +159,12 @@ void BattOrAgent::RecordClockSyncMarker(const std::string& marker) { |
| PerformAction(Action::REQUEST_CONNECTION); |
| } |
| +int BattOrAgent::Version() { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
|
charliea (OOO until 10-5)
2016/10/04 15:15:48
So after you make this look like:
void BattOrAgen
|
| + return 1; // Actually return here. |
| + return battor_eeprom_->version; |
| +} |
| + |
| void BattOrAgent::BeginConnect() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -187,6 +193,8 @@ void BattOrAgent::OnConnectionOpened(bool success) { |
| case Command::RECORD_CLOCK_SYNC_MARKER: |
| PerformAction(Action::SEND_CURRENT_SAMPLE_REQUEST); |
| return; |
| + case Command::VERSION: |
| + return; |
| case Command::INVALID: |
| NOTREACHED(); |
| } |
| @@ -530,6 +538,10 @@ void BattOrAgent::CompleteCommand(BattOrError error) { |
| FROM_HERE, base::Bind(&Listener::OnRecordClockSyncMarkerComplete, |
| base::Unretained(listener_), error)); |
| break; |
| + case Command::VERSION: |
| + base::ThreadTaskRunnerHandle::Get()->PostTask( |
| + FROM_HERE, base::Bind(&Listener::OnGetVersionComplete, |
| + base::Unretained(listener_), error)); |
| case Command::INVALID: |
| NOTREACHED(); |
| } |