Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Issue 1524873002: Creates a BattOrConnection for communicating with the BattOr (Closed)

Created:
5 years ago by charliea (OOO until 10-5)
Modified:
5 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Creates a BattOrConnection for communicating with the BattOr I first tried to implement the protocol with this logic rolled into BattOrAgent. However, BattOrAgent needs to act as a state machine stepping through the BattOr protocol and, as the state machine grew, it became obvious that we should move as much unrelated logic as possible out of the class. The byte-level protocol now seen in battor_connection.cc was an obvious choice to be moved elsewhere. For a look at how these communication primitives will be used to implement the protocol, see http://bit.ly/1UpLv3p. BUG=542837 Committed: https://crrev.com/07027e6fbaa31604a908f7d1d2b42e789e93add8 Cr-Commit-Position: refs/heads/master@{#365606}

Patch Set 1 : #

Total comments: 71

Patch Set 2 : Code review #

Total comments: 16

Patch Set 3 : Code review #

Patch Set 4 : Code review #

Total comments: 2

Patch Set 5 : Fixed gyp build file #

Patch Set 6 : Added missing dep #

Unified diffs Side-by-side diffs Delta from patch set Stats (+884 lines, -99 lines) Patch
M tools/battor_agent/BUILD.gn View 1 2 3 4 5 2 chunks +21 lines, -1 line 0 comments Download
M tools/battor_agent/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M tools/battor_agent/battor_agent.h View 1 2 4 chunks +15 lines, -28 lines 0 comments Download
M tools/battor_agent/battor_agent.cc View 1 2 4 chunks +27 lines, -54 lines 0 comments Download
M tools/battor_agent/battor_agent.gyp View 1 2 3 4 5 2 chunks +20 lines, -2 lines 0 comments Download
M tools/battor_agent/battor_agent_bin.cc View 3 chunks +5 lines, -10 lines 0 comments Download
A tools/battor_agent/battor_connection.h View 1 2 1 chunk +140 lines, -0 lines 0 comments Download
A tools/battor_agent/battor_connection.cc View 1 2 3 1 chunk +283 lines, -0 lines 0 comments Download
A tools/battor_agent/battor_connection_unittest.cc View 1 2 1 chunk +286 lines, -0 lines 0 comments Download
M tools/battor_agent/battor_error.h View 1 chunk +6 lines, -4 lines 0 comments Download
A tools/battor_agent/battor_protocol_types.h View 1 2 1 chunk +80 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
charliea (OOO until 10-5)
5 years ago (2015-12-14 18:50:41 UTC) #3
Zhen Wang
https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/battor_agent.gyp File tools/battor_agent/battor_agent.gyp (right): https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/battor_agent.gyp#newcode42 tools/battor_agent/battor_agent.gyp:42: 'target_name': 'sql_unittests', Where does "sql" come from? https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/battor_connection.cc File ...
5 years ago (2015-12-14 23:39:47 UTC) #4
Primiano Tucci (use gerrit)
Ok, generally makes sense. I think my major comment would be to use a Listener ...
5 years ago (2015-12-15 11:07:20 UTC) #5
charliea (OOO until 10-5)
https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/BUILD.gn File tools/battor_agent/BUILD.gn (right): https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/BUILD.gn#newcode19 tools/battor_agent/BUILD.gn:19: static_library("battor_agent_lib") { On 2015/12/15 11:07:19, Primiano Tucci wrote: > ...
5 years ago (2015-12-15 23:50:05 UTC) #6
Primiano Tucci (use gerrit)
Ran a bit short of time so couldn't look at the test, but the rest ...
5 years ago (2015-12-16 16:47:43 UTC) #7
Zhen Wang
lgtm https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.cc File tools/battor_agent/battor_connection.cc (right): https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.cc#newcode39 tools/battor_agent/battor_connection.cc:39: // nit: remove the empty line. https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.cc#newcode275 tools/battor_agent/battor_connection.cc:275: ...
5 years ago (2015-12-16 18:01:41 UTC) #8
charliea (OOO until 10-5)
+mmenke for net/base DEP https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/battor_connection.h File tools/battor_agent/battor_connection.h (right): https://codereview.chromium.org/1524873002/diff/20001/tools/battor_agent/battor_connection.h#newcode62 tools/battor_agent/battor_connection.h:62: protected: On 2015/12/16 16:47:43, Primiano ...
5 years ago (2015-12-16 18:27:55 UTC) #10
mmenke
You're just using net for IOBuffer, right? LGTM.
5 years ago (2015-12-16 18:32:10 UTC) #11
nednguyen
lgtm overall with a question https://codereview.chromium.org/1524873002/diff/80001/tools/battor_agent/battor_agent.h File tools/battor_agent/battor_agent.h (right): https://codereview.chromium.org/1524873002/diff/80001/tools/battor_agent/battor_agent.h#newcode53 tools/battor_agent/battor_agent.h:53: // BattOrConnection::Listener implementation. Should ...
5 years ago (2015-12-16 18:37:24 UTC) #12
nednguyen
https://codereview.chromium.org/1524873002/diff/80001/tools/battor_agent/battor_agent.h File tools/battor_agent/battor_agent.h (right): https://codereview.chromium.org/1524873002/diff/80001/tools/battor_agent/battor_agent.h#newcode53 tools/battor_agent/battor_agent.h:53: // BattOrConnection::Listener implementation. On 2015/12/16 18:37:24, nednguyen wrote: > ...
5 years ago (2015-12-16 18:38:51 UTC) #13
charliea (OOO until 10-5)
On 2015/12/16 18:32:10, mmenke wrote: > You're just using net for IOBuffer, right? LGTM. Yep!
5 years ago (2015-12-16 18:39:25 UTC) #14
charliea (OOO until 10-5)
On 2015/12/16 18:37:24, nednguyen wrote: > lgtm overall with a question > > https://codereview.chromium.org/1524873002/diff/80001/tools/battor_agent/battor_agent.h > ...
5 years ago (2015-12-16 18:41:48 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1524873002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1524873002/80001
5 years ago (2015-12-16 18:43:47 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/44294)
5 years ago (2015-12-16 18:49:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1524873002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1524873002/100001
5 years ago (2015-12-16 19:04:49 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/44305)
5 years ago (2015-12-16 19:09:50 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1524873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1524873002/120001
5 years ago (2015-12-16 19:18:16 UTC) #28
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.h File tools/battor_agent/battor_connection.h (right): https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.h#newcode57 tools/battor_agent/battor_connection.h:57: base::WeakPtr<Listener> listener, On 2015/12/16 18:27:55, charliea wrote: > On ...
5 years ago (2015-12-16 19:41:51 UTC) #29
charliea (OOO until 10-5)
On 2015/12/16 19:41:51, Primiano Tucci wrote: > https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.h > File tools/battor_agent/battor_connection.h (right): > > https://codereview.chromium.org/1524873002/diff/40001/tools/battor_agent/battor_connection.h#newcode57 ...
5 years ago (2015-12-16 19:54:31 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years ago (2015-12-16 20:22:30 UTC) #31
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/07027e6fbaa31604a908f7d1d2b42e789e93add8 Cr-Commit-Position: refs/heads/master@{#365606}
5 years ago (2015-12-16 20:23:17 UTC) #33
danakj
A revert of this CL (patchset #6 id:120001) has been created in https://codereview.chromium.org/1533643002/ by danakj@chromium.org. ...
5 years ago (2015-12-16 21:23:09 UTC) #34
charliea (OOO until 10-5)
5 years ago (2015-12-17 15:05:45 UTC) #35
Message was sent while issue was closed.
On 2015/12/16 21:23:09, danakj (behind on reviews) wrote:
> A revert of this CL (patchset #6 id:120001) has been created in
> https://codereview.chromium.org/1533643002/ by mailto:danakj@chromium.org.
> 
> The reason for reverting is: Build failures on windows? Not sure why this made
> it through the CQ then. Please follow up with a bug @ infra team when that is
> sorted out.
>
https://build.chromium.org/p/chromium/builders/Win/builds/38410/steps/compile...
> 
> FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc
> "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo
> /showIncludes /FC
@obj\tools\battor_agent\battor_agent_lib.battor_agent.obj.rsp
> /c ..\..\tools\battor_agent\battor_agent.cc
> /Foobj\tools\battor_agent\battor_agent_lib.battor_agent.obj
> /Fdobj\tools\battor_agent\battor_agent_lib.cc.pdb 
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2371: 'battor::__attribute__' : redefinition; different basic types
>        
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> see declaration of 'battor::__attribute__'
> FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc
> "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo
> /showIncludes /FC
> @obj\tools\battor_agent\battor_agent_lib.battor_connection.obj.rsp /c
> ..\..\tools\battor_agent\battor_connection.cc
> /Foobj\tools\battor_agent\battor_agent_lib.battor_connection.obj
> /Fdobj\tools\battor_agent\battor_agent_lib.cc.pdb 
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2371: 'battor::__attribute__' : redefinition; different basic types
>        
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> see declaration of 'battor::__attribute__'
> FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc
> "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo
> /showIncludes /FC
@obj\tools\battor_agent\battor_agent.battor_agent_bin.obj.rsp
> /c ..\..\tools\battor_agent\battor_agent_bin.cc
> /Foobj\tools\battor_agent\battor_agent.battor_agent_bin.obj
> /Fdobj\tools\battor_agent\battor_agent.cc.pdb 
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2065: 'packed' : undeclared identifier
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(73)
:
> error C2371: 'battor::__attribute__' : redefinition; different basic types
>        
> c:\b\build\slave\win\build\src\tools\battor_agent\battor_protocol_types.h(67)
:
> see declaration of 'battor::__attribute__'
> ninja: build stopped: subcommand failed..

Sorry about that - I'll look into fixing this.

Powered by Google App Engine
This is Rietveld 408576698