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

Issue 11360248: Use the new forwarder2's Daemon implementation in device_forwarder. (Closed)

Created:
8 years, 1 month ago by Philippe
Modified:
8 years, 1 month ago
Reviewers:
felipeg, bulach, digit1
CC:
chromium-reviews, ilevy+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, pam+watch_chromium.org, peter+watch_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org, ppi, pasko-google - do not use, Peter Beverloo
Visibility:
Public.

Description

Use the new forwarder2's Daemon implementation in device_forwarder. This lets device_forwarder be controlled (started and killed) like host_forwarder (see r167167). This has the main benefit of moving the setup/tear down complexity from the Python Forwarder wrapper code to the forwarder itself so that various clients (including WebKit) can use forwarder2 more easily (e.g. no need to use pexpect anymore (which is not available in WebKit)). This implied a refactoring in the Daemon class so that its clients don't have to duplicate the socket-related code. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=169334

Patch Set 1 : #

Patch Set 2 : #

Total comments: 19

Patch Set 3 : Address Marcus' comments #

Total comments: 11

Patch Set 4 : Address Felipe's comments #

Patch Set 5 : Address Marcus' comments #

Total comments: 8

Patch Set 6 : Address Felipe's comments + sync #

Patch Set 7 : Address David's comments #

Patch Set 8 : Add missing 'break' statement #

Total comments: 2

Patch Set 9 : Address David's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+561 lines, -305 lines) Patch
M build/android/pylib/android_commands.py View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M build/android/pylib/forwarder.py View 1 2 3 4 5 4 chunks +21 lines, -43 lines 0 comments Download
M tools/android/forwarder2/daemon.h View 1 chunk +54 lines, -9 lines 0 comments Download
M tools/android/forwarder2/daemon.cc View 1 2 3 4 5 6 7 8 3 chunks +203 lines, -85 lines 0 comments Download
M tools/android/forwarder2/device_controller.cc View 4 chunks +2 lines, -4 lines 0 comments Download
M tools/android/forwarder2/device_forwarder_main.cc View 1 2 3 4 5 2 chunks +147 lines, -32 lines 0 comments Download
M tools/android/forwarder2/forwarder.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M tools/android/forwarder2/host_forwarder_main.cc View 1 2 3 4 5 7 chunks +114 lines, -132 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Philippe
Can you please Felipe do a sanity check before I send this to other reviewers ...
8 years, 1 month ago (2012-11-14 14:07:44 UTC) #1
Philippe
8 years, 1 month ago (2012-11-14 14:34:51 UTC) #2
bulach
+peter in case there are any implications to the webkit side... I'll send comments shortly ...
8 years, 1 month ago (2012-11-14 18:34:35 UTC) #3
bulach
nice stuff, thanks! small suggestions below: http://codereview.chromium.org/11360248/diff/3010/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): http://codereview.chromium.org/11360248/diff/3010/build/android/pylib/android_commands.py#newcode478 build/android/pylib/android_commands.py:478: return (int(lines[-1]), lines[:len(lines) ...
8 years, 1 month ago (2012-11-15 02:08:18 UTC) #4
Philippe
Thanks Marcus! https://codereview.chromium.org/11360248/diff/3010/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://codereview.chromium.org/11360248/diff/3010/build/android/pylib/android_commands.py#newcode478 build/android/pylib/android_commands.py:478: return (int(lines[-1]), lines[:len(lines) - 2]) On 2012/11/15 ...
8 years, 1 month ago (2012-11-15 09:56:20 UTC) #5
felipeg
Thanks for doing this Philippe, The code is good, although is a little complex now, ...
8 years, 1 month ago (2012-11-15 15:54:54 UTC) #6
Philippe
Thanks Felipe! https://codereview.chromium.org/11360248/diff/13001/tools/android/forwarder2/host_forwarder_main.cc File tools/android/forwarder2/host_forwarder_main.cc (right): https://codereview.chromium.org/11360248/diff/13001/tools/android/forwarder2/host_forwarder_main.cc#newcode107 tools/android/forwarder2/host_forwarder_main.cc:107: class DaemonDelegate : public Daemon::ServerDelegate { On ...
8 years, 1 month ago (2012-11-15 16:25:18 UTC) #7
bulach
thanks philippe! clarifications inline: https://codereview.chromium.org/11360248/diff/3010/build/android/pylib/forwarder.py File build/android/pylib/forwarder.py (right): https://codereview.chromium.org/11360248/diff/3010/build/android/pylib/forwarder.py#newcode87 build/android/pylib/forwarder.py:87: raise Exception('Failed to start device ...
8 years, 1 month ago (2012-11-15 18:28:10 UTC) #8
felipeg
https://chromiumcodereview.appspot.com/11360248/diff/13001/tools/android/forwarder2/host_forwarder_main.cc File tools/android/forwarder2/host_forwarder_main.cc (right): https://chromiumcodereview.appspot.com/11360248/diff/13001/tools/android/forwarder2/host_forwarder_main.cc#newcode116 tools/android/forwarder2/host_forwarder_main.cc:116: DCHECK(!g_notifier); On 2012/11/15 16:25:19, Philippe wrote: > On 2012/11/15 ...
8 years, 1 month ago (2012-11-15 18:40:58 UTC) #9
Philippe
https://chromiumcodereview.appspot.com/11360248/diff/3010/build/android/pylib/forwarder.py File build/android/pylib/forwarder.py (right): https://chromiumcodereview.appspot.com/11360248/diff/3010/build/android/pylib/forwarder.py#newcode87 build/android/pylib/forwarder.py:87: raise Exception('Failed to start device forwarder:\n%s' % ( On ...
8 years, 1 month ago (2012-11-19 10:22:13 UTC) #10
felipeg
LGTM please ask david to take a look at the daemon implementation https://chromiumcodereview.appspot.com/11360248/diff/17002/tools/android/forwarder2/device_forwarder_main.cc File tools/android/forwarder2/device_forwarder_main.cc ...
8 years, 1 month ago (2012-11-19 14:43:37 UTC) #11
Philippe
Thanks Felipe. I did a sync too. David, can you please take a look at ...
8 years, 1 month ago (2012-11-19 14:51:43 UTC) #12
digit1
https://chromiumcodereview.appspot.com/11360248/diff/17002/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://chromiumcodereview.appspot.com/11360248/diff/17002/build/android/pylib/android_commands.py#newcode477 build/android/pylib/android_commands.py:477: command + '; echo $?', timeout_time, log_result) Nit: This ...
8 years, 1 month ago (2012-11-19 15:27:42 UTC) #13
Philippe
https://chromiumcodereview.appspot.com/11360248/diff/17002/build/android/pylib/android_commands.py File build/android/pylib/android_commands.py (right): https://chromiumcodereview.appspot.com/11360248/diff/17002/build/android/pylib/android_commands.py#newcode477 build/android/pylib/android_commands.py:477: command + '; echo $?', timeout_time, log_result) On 2012/11/19 ...
8 years, 1 month ago (2012-11-19 17:18:58 UTC) #14
digit1
https://chromiumcodereview.appspot.com/11360248/diff/15012/tools/android/forwarder2/daemon.cc File tools/android/forwarder2/daemon.cc (right): https://chromiumcodereview.appspot.com/11360248/diff/15012/tools/android/forwarder2/daemon.cc#newcode295 tools/android/forwarder2/daemon.cc:295: memcpy(&new_action.sa_mask, &blocked_signals_set, sizeof(new_action.sa_mask)); this code can be simplied. You ...
8 years, 1 month ago (2012-11-23 10:08:40 UTC) #15
Philippe
https://chromiumcodereview.appspot.com/11360248/diff/15012/tools/android/forwarder2/daemon.cc File tools/android/forwarder2/daemon.cc (right): https://chromiumcodereview.appspot.com/11360248/diff/15012/tools/android/forwarder2/daemon.cc#newcode295 tools/android/forwarder2/daemon.cc:295: memcpy(&new_action.sa_mask, &blocked_signals_set, sizeof(new_action.sa_mask)); On 2012/11/23 10:08:41, digit1 wrote: > ...
8 years, 1 month ago (2012-11-23 10:31:14 UTC) #16
digit1
lgtm
8 years, 1 month ago (2012-11-23 10:32:47 UTC) #17
Philippe
On 2012/11/23 10:32:47, digit1 wrote: > lgtm Thanks David. Marcus can you please take a ...
8 years, 1 month ago (2012-11-23 10:38:45 UTC) #18
bulach
lgtm, thanks!
8 years, 1 month ago (2012-11-23 10:42:02 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/11360248/16016
8 years, 1 month ago (2012-11-23 10:43:12 UTC) #20
commit-bot: I haz the power
8 years, 1 month ago (2012-11-23 12:39:36 UTC) #21
Message was sent while issue was closed.
Change committed as 169334

Powered by Google App Engine
This is Rietveld 408576698