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

Issue 409883006: GCM: D-Bus methods for wake-on-packet (Closed)

Created:
6 years, 5 months ago by Luigi Semenzato
Modified:
6 years, 3 months ago
CC:
Chirantan Ekbote, chromium-reviews, oshima+watch_chromium.org, snanda_chromium.ort, stevenjb+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

GCM: D-Bus methods for wake-on-packet Program the NIC to wake-on-packet for packets arriving from the GCM server. Chrome notifies the connection manager (shill) by calling D-Bus methods. The return status indicates if the operation succeeded or not (depending on hardware support and the type of connection). Keywords: wowlan, wake-on-lan, wake-on-wlan BUG=360295 TEST=verified dbus methods are called, and packets are sent on the TEST=connection passed to the methods. Also verified that shill TEST=programs the NIC correctly, and packets wake up the device. Committed: https://crrev.com/88a95a70fa94bb578b371490d0f9868584b7096e Cr-Commit-Position: refs/heads/master@{#294936}

Patch Set 1 #

Total comments: 6

Patch Set 2 : GCM: D-Bus methods for wake-on-packet #

Total comments: 3

Patch Set 3 : create a GCM driver early and attach app handler to it #

Patch Set 4 : move chromeos-specific code to gcm profile creation #

Total comments: 20

Patch Set 5 : refining based on review comments #

Total comments: 8

Patch Set 6 : cleanup #

Total comments: 12

Patch Set 7 : fixes from review, plus change to dbus protocol #

Total comments: 1

Patch Set 8 : small fix, plus system_api DEPS #

Patch Set 9 : remember to register the observer #

Total comments: 6

Patch Set 10 : GCM: D-Bus methods for wake-on-packet #

Patch Set 11 : fix unit tests #

Total comments: 2

Patch Set 12 : fix unit tests really #

Patch Set 13 : fix extension_gcm_app_handler_unittests #

Total comments: 3

Patch Set 14 : remove (void) casts #

Patch Set 15 : don't break windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -12 lines) Patch
M DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_gcm_app_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/chromeos_gcm_connection_observer.h View 1 2 3 4 5 6 7 8 9 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/chromeos_gcm_connection_observer.cc View 1 2 3 4 5 6 7 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_shill_manager_client.h View 1 2 3 4 5 6 2 chunks +16 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_shill_manager_client.cc View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_shill_manager_client.h View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download
M chromeos/dbus/shill_manager_client.h View 1 2 3 4 5 6 2 chunks +31 lines, -11 lines 0 comments Download
M chromeos/dbus/shill_manager_client.cc View 1 2 3 4 5 6 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (12 generated)
Luigi Semenzato
NOTE: THIS CODE DOES NOT PASS THE PRE-SUBMIT CHECKS I think this is because the ...
6 years, 5 months ago (2014-07-22 20:15:43 UTC) #1
Daniel Erat
check with the gcm_driver owners to see if it's okay for it to depend on ...
6 years, 5 months ago (2014-07-22 20:32:01 UTC) #2
stevenjb
On 2014/07/22 20:32:01, Daniel Erat wrote: > check with the gcm_driver owners to see if ...
6 years, 5 months ago (2014-07-22 20:38:49 UTC) #3
stevenjb
https://codereview.chromium.org/409883006/diff/1/components/gcm_driver/default_gcm_app_handler.h File components/gcm_driver/default_gcm_app_handler.h (right): https://codereview.chromium.org/409883006/diff/1/components/gcm_driver/default_gcm_app_handler.h#newcode32 components/gcm_driver/default_gcm_app_handler.h:32: DISALLOW_COPY_AND_ASSIGN(DefaultGCMAppHandler); This should be last. https://codereview.chromium.org/409883006/diff/1/components/gcm_driver/default_gcm_app_handler.h#newcode35 components/gcm_driver/default_gcm_app_handler.h:35: const std::string& ...
6 years, 5 months ago (2014-07-22 20:42:57 UTC) #4
fgorski
https://codereview.chromium.org/409883006/diff/1/components/gcm_driver/default_gcm_app_handler.h File components/gcm_driver/default_gcm_app_handler.h (right): https://codereview.chromium.org/409883006/diff/1/components/gcm_driver/default_gcm_app_handler.h#newcode35 components/gcm_driver/default_gcm_app_handler.h:35: const std::string& error); On 2014/07/22 20:42:57, stevenjb wrote: > ...
6 years, 5 months ago (2014-07-23 20:18:03 UTC) #5
Luigi Semenzato
Filip, sorry if I didn't make it clearer, but this code is here merely to ...
6 years, 5 months ago (2014-07-23 23:23:13 UTC) #6
Daniel Erat
On 2014/07/23 23:23:13, Luigi Semenzato wrote: > Filip, sorry if I didn't make it clearer, ...
6 years, 5 months ago (2014-07-24 14:25:21 UTC) #7
Luigi Semenzato
Hi! Resuming this after vacation and other delays. On 2014/07/24 14:25:21, Daniel Erat wrote: > ...
6 years, 4 months ago (2014-08-18 21:09:41 UTC) #8
Daniel Erat
On Mon, Aug 18, 2014 at 2:09 PM, <semenzato@chromium.org> wrote: > Hi! Resuming this after ...
6 years, 4 months ago (2014-08-19 00:16:50 UTC) #9
fgorski
On 2014/08/19 00:16:50, Daniel Erat wrote: > On Mon, Aug 18, 2014 at 2:09 PM, ...
6 years, 4 months ago (2014-08-19 17:31:52 UTC) #10
Luigi Semenzato
Thank you Filip. This, I think, is a cleaner way of organizing the code because ...
6 years, 4 months ago (2014-08-19 23:25:03 UTC) #11
fgorski
On 2014/08/19 23:25:03, Luigi Semenzato wrote: > Thank you Filip. This, I think, is a ...
6 years, 4 months ago (2014-08-20 23:23:51 UTC) #12
Luigi Semenzato
On 2014/08/20 23:23:51, fgorski wrote: > On 2014/08/19 23:25:03, Luigi Semenzato wrote: > > Thank ...
6 years, 4 months ago (2014-08-21 05:36:31 UTC) #13
fgorski
Valid concern, Luigi. I think I am ok with having the statics in the default ...
6 years, 4 months ago (2014-08-21 18:08:58 UTC) #14
fgorski
A few comments. https://codereview.chromium.org/409883006/diff/20001/components/gcm_driver/default_gcm_app_handler.h File components/gcm_driver/default_gcm_app_handler.h (right): https://codereview.chromium.org/409883006/diff/20001/components/gcm_driver/default_gcm_app_handler.h#newcode37 components/gcm_driver/default_gcm_app_handler.h:37: DISALLOW_COPY_AND_ASSIGN(DefaultGCMAppHandler); following stevenjb, move this to ...
6 years, 4 months ago (2014-08-21 18:14:16 UTC) #15
Nicolas Zea
Can't you register the callbacks from within the GCMProfileService (possibly by adding a getter for ...
6 years, 4 months ago (2014-08-21 19:03:09 UTC) #16
Luigi Semenzato
On 2014/08/21 19:03:09, Nicolas Zea wrote: > Can't you register the callbacks from within the ...
6 years, 4 months ago (2014-08-21 19:59:04 UTC) #17
Luigi Semenzato
On 2014/08/21 19:59:04, Luigi Semenzato wrote: > On 2014/08/21 19:03:09, Nicolas Zea wrote: > > ...
6 years, 4 months ago (2014-08-21 21:06:09 UTC) #18
Nicolas Zea
https://codereview.chromium.org/409883006/diff/60001/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (right): https://codereview.chromium.org/409883006/diff/60001/chrome/browser/services/gcm/gcm_profile_service.cc#newcode129 chrome/browser/services/gcm/gcm_profile_service.cc:129: new gcm::ChromeOSGCMAppHandler()); Note that this will leak, as the ...
6 years, 4 months ago (2014-08-21 21:22:19 UTC) #19
fgorski
IPEndpoint in Disconnect: As for needing to have ip_endpoint in disconnect, that could easily be ...
6 years, 4 months ago (2014-08-21 21:38:26 UTC) #20
Luigi Semenzato
On 2014/08/21 21:38:26, fgorski wrote: > IPEndpoint in Disconnect: > As for needing to have ...
6 years, 4 months ago (2014-08-21 21:52:25 UTC) #21
fgorski
On 2014/08/21 21:52:25, Luigi Semenzato wrote: > On 2014/08/21 21:38:26, fgorski wrote: > > IPEndpoint ...
6 years, 4 months ago (2014-08-21 22:00:54 UTC) #22
Daniel Erat
https://codereview.chromium.org/409883006/diff/60001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): https://codereview.chromium.org/409883006/diff/60001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode777 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:777: void ChromeBrowserMainPartsChromeos::OnGCMDisconnected() { nit: add a "static" comment here ...
6 years, 4 months ago (2014-08-21 22:17:38 UTC) #23
Luigi Semenzato
I think we can start worrying about details now. (I fixed some already.) I am ...
6 years, 4 months ago (2014-08-22 01:08:19 UTC) #24
Daniel Erat
lgtm for chromeos/ after some comments are addressed; i'll let the people who work on ...
6 years, 4 months ago (2014-08-23 14:44:52 UTC) #25
Luigi Semenzato
Thank you. chromeos_unittests now compiles. https://codereview.chromium.org/409883006/diff/80001/chromeos/dbus/fake_shill_manager_client.h File chromeos/dbus/fake_shill_manager_client.h (right): https://codereview.chromium.org/409883006/diff/80001/chromeos/dbus/fake_shill_manager_client.h#newcode16 chromeos/dbus/fake_shill_manager_client.h:16: On 2014/08/23 14:44:52, Daniel ...
6 years, 4 months ago (2014-08-25 19:59:34 UTC) #26
fgorski
Hi, Luigi, It looks like the patch is almost there. We've put some more thought ...
6 years, 3 months ago (2014-08-26 22:26:08 UTC) #27
fgorski
On 2014/08/26 22:26:08, fgorski wrote: > Hi, Luigi, > > It looks like the patch ...
6 years, 3 months ago (2014-08-27 23:20:08 UTC) #28
Luigi Semenzato
Thanks. I made the changes, and also made a slight change to the D-Bus protocol ...
6 years, 3 months ago (2014-09-05 18:02:33 UTC) #29
Luigi Semenzato
chromeos_unittests still compiles.
6 years, 3 months ago (2014-09-05 18:06:06 UTC) #30
fgorski
Patch doesn't apply because of the GCMAppHandler split into handler and connection observer https://code.google.com/p/chromium/codesearch#chromium/src/components/gcm_driver/gcm_connection_observer.h And ...
6 years, 3 months ago (2014-09-05 18:17:31 UTC) #31
stevenjb
src/chromeos lgtm
6 years, 3 months ago (2014-09-05 18:51:38 UTC) #32
Luigi Semenzato
Thank you all. I changed the code from app handler to connection observer and tested ...
6 years, 3 months ago (2014-09-08 20:24:35 UTC) #33
fgorski
LGTM with nits. Thanks for your patience, Luigi. https://codereview.chromium.org/409883006/diff/160001/chrome/browser/services/gcm/chromeos_gcm_connection_observer.h File chrome/browser/services/gcm/chromeos_gcm_connection_observer.h (right): https://codereview.chromium.org/409883006/diff/160001/chrome/browser/services/gcm/chromeos_gcm_connection_observer.h#newcode10 chrome/browser/services/gcm/chromeos_gcm_connection_observer.h:10: #include ...
6 years, 3 months ago (2014-09-08 21:48:18 UTC) #34
Luigi Semenzato
Thank you very much Filip! https://codereview.chromium.org/409883006/diff/160001/chrome/browser/services/gcm/chromeos_gcm_connection_observer.h File chrome/browser/services/gcm/chromeos_gcm_connection_observer.h (right): https://codereview.chromium.org/409883006/diff/160001/chrome/browser/services/gcm/chromeos_gcm_connection_observer.h#newcode10 chrome/browser/services/gcm/chromeos_gcm_connection_observer.h:10: #include "net/base/ip_endpoint.h" On 2014/09/08 ...
6 years, 3 months ago (2014-09-11 18:43:33 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/180001
6 years, 3 months ago (2014-09-11 18:45:22 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/13342)
6 years, 3 months ago (2014-09-11 20:41:22 UTC) #39
Luigi Semenzato
On 2014/09/11 20:41:22, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-11 21:00:32 UTC) #40
fgorski
On 2014/09/11 21:00:32, Luigi Semenzato wrote: > On 2014/09/11 20:41:22, I haz the power (commit-bot) ...
6 years, 3 months ago (2014-09-11 21:23:27 UTC) #41
Luigi Semenzato
> All of them hit a dbus thread manager DCHECK > [28906:28906:0911/131601:526028966632:FATAL:dbus_thread_manager.cc(418)] Check > failed: ...
6 years, 3 months ago (2014-09-11 21:50:38 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/200001
6 years, 3 months ago (2014-09-11 23:22:29 UTC) #44
Chirantan Ekbote
https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc File chrome/browser/services/gcm/gcm_profile_service_unittest.cc (right): https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc#newcode126 chrome/browser/services/gcm/gcm_profile_service_unittest.cc:126: (void) chromeos::DBusThreadManager::GetSetterForTesting(); This is causing the build to fail ...
6 years, 3 months ago (2014-09-12 00:52:16 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/15551)
6 years, 3 months ago (2014-09-12 01:09:27 UTC) #47
Luigi Semenzato
https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc File chrome/browser/services/gcm/gcm_profile_service_unittest.cc (right): https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc#newcode126 chrome/browser/services/gcm/gcm_profile_service_unittest.cc:126: (void) chromeos::DBusThreadManager::GetSetterForTesting(); On 2014/09/12 00:52:16, chirantan wrote: > This ...
6 years, 3 months ago (2014-09-12 01:24:21 UTC) #48
Luigi Semenzato
On 2014/09/12 01:24:21, Luigi Semenzato wrote: > https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc > File chrome/browser/services/gcm/gcm_profile_service_unittest.cc (right): > > https://codereview.chromium.org/409883006/diff/200001/chrome/browser/services/gcm/gcm_profile_service_unittest.cc#newcode126 ...
6 years, 3 months ago (2014-09-12 01:31:27 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/220001
6 years, 3 months ago (2014-09-12 01:39:42 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg/builds/14901)
6 years, 3 months ago (2014-09-12 02:44:43 UTC) #53
Luigi Semenzato
On 2014/09/12 02:44:43, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-12 15:10:01 UTC) #54
Luigi Semenzato
On 2014/09/12 15:10:01, Luigi Semenzato wrote: > On 2014/09/12 02:44:43, I haz the power (commit-bot) ...
6 years, 3 months ago (2014-09-12 15:12:46 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/220001
6 years, 3 months ago (2014-09-12 15:12:57 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/13676)
6 years, 3 months ago (2014-09-12 16:38:37 UTC) #59
Luigi Semenzato
Vincent and/or Yoyo, would you please review a small change to extension_gcm_app_handler_unittest.cc? (First file.) You ...
6 years, 3 months ago (2014-09-13 00:42:50 UTC) #61
Yoyo Zhou
On 2014/09/13 00:42:50, Luigi Semenzato wrote: > Vincent and/or Yoyo, would you please review a ...
6 years, 3 months ago (2014-09-13 00:50:35 UTC) #62
Yoyo Zhou
https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc File chrome/browser/extensions/extension_gcm_app_handler_unittest.cc (right): https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc#newcode225 chrome/browser/extensions/extension_gcm_app_handler_unittest.cc:225: (void) chromeos::DBusThreadManager::GetSetterForTesting(); What is this (void) doing here?
6 years, 3 months ago (2014-09-13 00:50:47 UTC) #63
Luigi Semenzato
https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc File chrome/browser/extensions/extension_gcm_app_handler_unittest.cc (right): https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc#newcode225 chrome/browser/extensions/extension_gcm_app_handler_unittest.cc:225: (void) chromeos::DBusThreadManager::GetSetterForTesting(); On 2014/09/13 00:50:47, Yoyo Zhou wrote: > ...
6 years, 3 months ago (2014-09-13 01:02:48 UTC) #64
Yoyo Zhou
https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc File chrome/browser/extensions/extension_gcm_app_handler_unittest.cc (right): https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc#newcode225 chrome/browser/extensions/extension_gcm_app_handler_unittest.cc:225: (void) chromeos::DBusThreadManager::GetSetterForTesting(); On 2014/09/13 01:02:48, Luigi Semenzato wrote: > ...
6 years, 3 months ago (2014-09-13 01:09:43 UTC) #65
Luigi Semenzato
On 2014/09/13 01:09:43, Yoyo Zhou wrote: > https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc > File chrome/browser/extensions/extension_gcm_app_handler_unittest.cc (right): > > https://codereview.chromium.org/409883006/diff/240001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc#newcode225 ...
6 years, 3 months ago (2014-09-13 01:29:31 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/260001
6 years, 3 months ago (2014-09-15 16:19:26 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg/builds/15612)
6 years, 3 months ago (2014-09-15 19:23:59 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/409883006/280001
6 years, 3 months ago (2014-09-15 21:15:28 UTC) #72
commit-bot: I haz the power
Committed patchset #15 (id:280001) as 2fb40e12b3e04a626ffbe53aededb6e2a02b958e
6 years, 3 months ago (2014-09-16 00:13:53 UTC) #73
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/88a95a70fa94bb578b371490d0f9868584b7096e Cr-Commit-Position: refs/heads/master@{#294936}
6 years, 3 months ago (2014-09-16 00:18:48 UTC) #74
Mr4D (OOO till 08-26)
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/584753002/ by skuhne@chromium.org. ...
6 years, 3 months ago (2014-09-18 23:08:55 UTC) #75
Luigi Semenzato
6 years, 3 months ago (2014-09-19 01:07:13 UTC) #76
Message was sent while issue was closed.
Hello reviewers!

This has been reverted because it caused random crashes in the BVT.  All I know
is they are signal 6 (SIGABORT): not a segv, rather some assertion failure.

I am trying to analyze the code and have some questions:

We have this code in the GCMProfileService constructor:

   chromeos_connection_observer_.reset(new gcm::ChromeOSGCMConnectionObserver);
   driver_->AddConnectionObserver(chromeos_connection_observer_.get());

and the reverse in GCMProfileService::ShutDown():

  driver_->RemoveConnectionObserver(chromeos_connection_observer_.get());
  chromeos_connection_observer_.reset();

Is this correct?  Is it possible that ShutDown() is called multiple times on the
same GCMProfileService object?

Or is it the case that the connection observer should be added in Register()?

Similarly, is it possible that a GCMProfileService object outlives the
ShillManagerClient object?

I see no other opportunities for races.

Thank you!

Powered by Google App Engine
This is Rietveld 408576698