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

Issue 879233003: Initial RemoteCommandService (Closed)

Created:
5 years, 10 months ago by binjin
Modified:
5 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@remote-commands
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial RemoteCommandService This CL adds initial implementation of RemoteCommandService. RemoteCommandService contains a RemoteCommandsQueue and will interacts with DMServer to fetch and run commands in sequence. Protocol modification is made to protobuf as well. BUG=None Committed: https://crrev.com/efa8017cfd57b38d0126e994a5e29aba7fbf98e8 Cr-Commit-Position: refs/heads/master@{#321103}

Patch Set 1 : early prototype (untested) #

Patch Set 2 : fix lint #

Patch Set 3 : fix last_command_id #

Total comments: 17

Patch Set 4 : fixes addressing #3 #

Patch Set 5 : rebase #

Patch Set 6 : WIP #

Patch Set 7 : WIP #

Total comments: 94

Patch Set 8 : fixes addressing #7 #

Patch Set 9 : add test to CloudPolicyClientTest #

Patch Set 10 : (rebase only) #

Patch Set 11 : minor fixes #

Patch Set 12 : comments grammar fixes; fix win compile #

Total comments: 106

Patch Set 13 : fixes addressing #10 #11 and #12 #

Total comments: 18

Patch Set 14 : fixes addressing #14 #

Total comments: 40

Patch Set 15 : fixes addressing #16 #

Patch Set 16 : minor fixes #

Total comments: 196

Patch Set 17 : fixes addressing #18 and #19 #

Patch Set 18 : more fixes #

Total comments: 20

Patch Set 19 : addressed #25 #

Total comments: 32

Patch Set 20 : fixes addressing #28 #

Total comments: 19

Patch Set 21 : rebase, fixes addressing #31 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1224 lines, -21 lines) Patch
M base/test/test_mock_time_task_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +5 lines, -0 lines 0 comments Download
M base/test/test_mock_time_task_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -1 line 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M components/policy.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M components/policy/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M components/policy/core/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +30 lines, -3 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +56 lines, -10 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +79 lines, -3 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_constants.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_constants.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_core.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +15 lines, -0 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_core.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +15 lines, -0 lines 0 comments Download
M components/policy/core/common/cloud/device_management_service.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/policy/core/common/cloud/device_management_service.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/policy/core/common/cloud/mock_cloud_policy_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
A components/policy/core/common/remote_commands/remote_commands_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +31 lines, -0 lines 0 comments Download
A components/policy/core/common/remote_commands/remote_commands_factory.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M components/policy/core/common/remote_commands/remote_commands_queue.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M components/policy/core/common/remote_commands/remote_commands_queue.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
A components/policy/core/common/remote_commands/remote_commands_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +106 lines, -0 lines 0 comments Download
A components/policy/core/common/remote_commands/remote_commands_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +152 lines, -0 lines 0 comments Download
A components/policy/core/common/remote_commands/remote_commands_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +400 lines, -0 lines 0 comments Download
A components/policy/core/common/remote_commands/testing_remote_commands_server.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +126 lines, -0 lines 0 comments Download
A components/policy/core/common/remote_commands/testing_remote_commands_server.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +147 lines, -0 lines 0 comments Download
M components/policy/policy_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M components/policy/proto/device_management_backend.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +24 lines, -1 line 0 comments Download

Messages

Total messages: 45 (10 generated)
binjin
Hello Bartosz, Could you have an early review on this? Bin
5 years, 10 months ago (2015-01-28 15:39:36 UTC) #2
bartfab (slow)
https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h#newcode150 components/policy/core/common/cloud/cloud_policy_client.h:150: virtual scoped_ptr<DeviceManagementRequestJob> CreateRemoteCommandsJob(); Why not have this method create ...
5 years, 10 months ago (2015-01-29 10:18:06 UTC) #3
binjin
https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h#newcode150 components/policy/core/common/cloud/cloud_policy_client.h:150: virtual scoped_ptr<DeviceManagementRequestJob> CreateRemoteCommandsJob(); On 2015/01/29 10:18:05, bartfab wrote: > ...
5 years, 10 months ago (2015-01-29 10:44:10 UTC) #4
bartfab (slow)
https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/40001/components/policy/core/common/cloud/cloud_policy_client.h#newcode150 components/policy/core/common/cloud/cloud_policy_client.h:150: virtual scoped_ptr<DeviceManagementRequestJob> CreateRemoteCommandsJob(); On 2015/01/29 10:44:10, binjin wrote: > ...
5 years, 10 months ago (2015-01-29 15:28:58 UTC) #5
binjin
Hello Bartosz, Could you have a look at the latest patchset? Bin
5 years, 10 months ago (2015-02-12 09:37:38 UTC) #6
bartfab (slow)
https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.cc File chrome/browser/policy/cloud/test_request_interceptor.cc (right): https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.cc#newcode150 chrome/browser/policy/cloud/test_request_interceptor.cc:150: std::string headers(kGoodHeaders, arraysize(kGoodHeaders)); Nit: const. https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.cc#newcode265 chrome/browser/policy/cloud/test_request_interceptor.cc:265: return BadRequestJobCallback(request, ...
5 years, 10 months ago (2015-02-12 14:29:20 UTC) #7
binjin
Hello Bartosz, Please take a look at the newest patchset. Thanks -Bin https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.cc File chrome/browser/policy/cloud/test_request_interceptor.cc ...
5 years, 10 months ago (2015-02-16 22:46:24 UTC) #9
bartfab (slow)
I reviewed most of your test infrastructure. I will continue reviewing the rest tomorrow. https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.h ...
5 years, 10 months ago (2015-02-17 18:13:53 UTC) #10
bartfab (slow)
I finished reviewing everything except the browser test. https://codereview.chromium.org/879233003/diff/240001/components/policy/core/common/cloud/cloud_policy_client_unittest.cc File components/policy/core/common/cloud/cloud_policy_client_unittest.cc (right): https://codereview.chromium.org/879233003/diff/240001/components/policy/core/common/cloud/cloud_policy_client_unittest.cc#newcode48 components/policy/core/common/cloud/cloud_policy_client_unittest.cc:48: const ...
5 years, 10 months ago (2015-02-18 11:12:53 UTC) #11
bartfab (slow)
https://codereview.chromium.org/879233003/diff/240001/chrome/browser/policy/remote_commands/remote_commands_browsertest.cc File chrome/browser/policy/remote_commands/remote_commands_browsertest.cc (right): https://codereview.chromium.org/879233003/diff/240001/chrome/browser/policy/remote_commands/remote_commands_browsertest.cc#newcode64 chrome/browser/policy/remote_commands/remote_commands_browsertest.cc:64: MOCK_METHOD0(BuildTestCommand, TestRemoteCommandJob*()); It looks like BuildTestCommand() always does the ...
5 years, 10 months ago (2015-02-18 13:21:53 UTC) #12
binjin
https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.h File chrome/browser/policy/cloud/test_request_interceptor.h (right): https://codereview.chromium.org/879233003/diff/120001/chrome/browser/policy/cloud/test_request_interceptor.h#newcode37 chrome/browser/policy/cloud/test_request_interceptor.h:37: // If a null URLRequestJob is returned by this ...
5 years, 10 months ago (2015-02-18 15:37:51 UTC) #13
bartfab (slow)
The CL is coming together nicely. I still think that most if not all of ...
5 years, 10 months ago (2015-02-23 13:13:57 UTC) #14
binjin
https://codereview.chromium.org/879233003/diff/240001/chrome/browser/policy/remote_commands/remote_commands_browsertest.cc File chrome/browser/policy/remote_commands/remote_commands_browsertest.cc (right): https://codereview.chromium.org/879233003/diff/240001/chrome/browser/policy/remote_commands/remote_commands_browsertest.cc#newcode81 chrome/browser/policy/remote_commands/remote_commands_browsertest.cc:81: class MockRemoteCommandsServer : public TestingRemoteCommandsServer { On 2015/02/23 13:13:56, ...
5 years, 10 months ago (2015-02-24 05:29:50 UTC) #15
bartfab (slow)
Things are looking good overall, but I am too jet-lagged to approve the CL with ...
5 years, 10 months ago (2015-02-27 03:59:52 UTC) #16
binjin
https://codereview.chromium.org/879233003/diff/260001/components/policy/core/common/remote_commands/remote_commands_service.h File components/policy/core/common/remote_commands/remote_commands_service.h (right): https://codereview.chromium.org/879233003/diff/260001/components/policy/core/common/remote_commands/remote_commands_service.h#newcode69 components/policy/core/common/remote_commands/remote_commands_service.h:69: // ID for the latest command which has started ...
5 years, 9 months ago (2015-02-27 18:23:05 UTC) #17
bartfab (slow)
I finished reviewing everything except the two unit tests. I will do those next. As ...
5 years, 9 months ago (2015-02-28 00:01:27 UTC) #18
bartfab (slow)
https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client_unittest.cc File components/policy/core/common/cloud/cloud_policy_client_unittest.cc (right): https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client_unittest.cc#newcode65 components/policy/core/common/cloud/cloud_policy_client_unittest.cc:65: // A mock class to allow us to set ...
5 years, 9 months ago (2015-02-28 00:32:42 UTC) #19
binjin
Addressed most of comments except three. 1 in cloud_policy_client.h 1 in remote_commands_service.h 1 in device_management_backend.proto ...
5 years, 9 months ago (2015-02-28 02:18:08 UTC) #20
hipporharry
How would you go about to create a file to log all incognito browsing on ...
5 years, 9 months ago (2015-03-09 16:16:30 UTC) #22
binjin
Addressed the left three comments https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.h#newcode151 components/policy/core/common/cloud/cloud_policy_client.h:151: RemoteCommandJob::UniqueIDType last_command_id, On 2015/02/28 ...
5 years, 9 months ago (2015-03-09 16:31:56 UTC) #23
bartfab (slow)
https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.cc File components/policy/core/common/cloud/cloud_policy_client.cc (right): https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.cc#newcode310 components/policy/core/common/cloud/cloud_policy_client.cc:310: em::DeviceRemoteCommandRequest* request = On 2015/02/28 02:18:04, binjin wrote: > ...
5 years, 9 months ago (2015-03-10 16:09:21 UTC) #25
binjin
https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.cc File components/policy/core/common/cloud/cloud_policy_client.cc (right): https://codereview.chromium.org/879233003/diff/320001/components/policy/core/common/cloud/cloud_policy_client.cc#newcode310 components/policy/core/common/cloud/cloud_policy_client.cc:310: em::DeviceRemoteCommandRequest* request = On 2015/03/10 16:09:20, bartfab wrote: > ...
5 years, 9 months ago (2015-03-12 11:03:16 UTC) #26
bartfab (slow)
https://codereview.chromium.org/879233003/diff/360001/components/policy/core/common/cloud/mock_cloud_policy_client.h File components/policy/core/common/cloud/mock_cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/360001/components/policy/core/common/cloud/mock_cloud_policy_client.h#newcode40 components/policy/core/common/cloud/mock_cloud_policy_client.h:40: MOCK_METHOD3( Why are you no longer mocking this method? ...
5 years, 9 months ago (2015-03-12 14:00:56 UTC) #27
binjin
https://codereview.chromium.org/879233003/diff/360001/components/policy/core/common/cloud/mock_cloud_policy_client.h File components/policy/core/common/cloud/mock_cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/360001/components/policy/core/common/cloud/mock_cloud_policy_client.h#newcode40 components/policy/core/common/cloud/mock_cloud_policy_client.h:40: MOCK_METHOD3( On 2015/03/12 14:00:54, bartfab wrote: > Why are ...
5 years, 9 months ago (2015-03-12 14:08:36 UTC) #28
binjin
https://codereview.chromium.org/879233003/diff/380001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/380001/components/policy/core/common/cloud/cloud_policy_client.h#newcode147 components/policy/core/common/cloud/cloud_policy_client.h:147: // Attempts to fetch remote commands, with |last_command_id| being ...
5 years, 9 months ago (2015-03-12 17:58:58 UTC) #29
binjin
Bartosz, could you have a look?
5 years, 9 months ago (2015-03-17 08:59:30 UTC) #30
bartfab (slow)
LGTM with nits. https://codereview.chromium.org/879233003/diff/400001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/400001/components/policy/core/common/cloud/cloud_policy_client.h#newcode147 components/policy/core/common/cloud/cloud_policy_client.h:147: // Attempts to fetch remote commands, ...
5 years, 9 months ago (2015-03-17 14:01:22 UTC) #31
binjin
mark, jam: Could either of you take a quick look at the changes I made ...
5 years, 9 months ago (2015-03-17 14:32:01 UTC) #33
Mark Mentovai
LGTM in base
5 years, 9 months ago (2015-03-17 14:47:17 UTC) #34
binjin
https://codereview.chromium.org/879233003/diff/400001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): https://codereview.chromium.org/879233003/diff/400001/components/policy/core/common/cloud/cloud_policy_client.h#newcode147 components/policy/core/common/cloud/cloud_policy_client.h:147: // Attempts to fetch remote commands, with |last_command_id| being ...
5 years, 9 months ago (2015-03-18 10:09:39 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/879233003/420001
5 years, 9 months ago (2015-03-18 10:20:20 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/879233003/420001
5 years, 9 months ago (2015-03-18 10:52:08 UTC) #42
bartfab (slow)
Still LGTM. How come this has "BUG=None" set? Is there no bug for this work? ...
5 years, 9 months ago (2015-03-18 10:52:25 UTC) #43
commit-bot: I haz the power
Committed patchset #21 (id:420001)
5 years, 9 months ago (2015-03-18 10:53:32 UTC) #44
commit-bot: I haz the power
5 years, 9 months ago (2015-03-18 10:54:07 UTC) #45
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/efa8017cfd57b38d0126e994a5e29aba7fbf98e8
Cr-Commit-Position: refs/heads/master@{#321103}

Powered by Google App Engine
This is Rietveld 408576698