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

Issue 70683002: Stub out ServiceWorkerRegistration and Version classes (Closed)

Created:
7 years, 1 month ago by alecflett
Modified:
7 years, 1 month ago
Reviewers:
michaeln, kinuko
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Stub out ServiceWorkerRegistration and Version classes This stubs out the basic registration classes, spun out of http://crrev.com/62203007. Tests are included which make sure that shutdown is reliable. A single, simplistic ActivateInWaitingVersion() exists as a way to demonstrate the relationship between in-waiting and active versions. BUG= TBR=jam@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235639

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address review comments #

Patch Set 3 : Even more class comments #

Patch Set 4 : Update to ToT #

Total comments: 6

Patch Set 5 : Address review comments #

Patch Set 6 : Fix build issues #

Total comments: 9

Patch Set 7 : Switch all parameters to raw pointers #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -4 lines) Patch
A content/browser/service_worker/service_worker_registration.h View 1 2 3 4 5 6 1 chunk +88 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_registration.cc View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_registration_unittest.cc View 1 1 chunk +82 lines, -0 lines 0 comments Download
A content/browser/service_worker/service_worker_version.h View 1 2 3 4 5 6 1 chunk +69 lines, -0 lines 4 comments Download
A content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 1 chunk +8 lines, -4 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
alecflett
7 years, 1 month ago (2013-11-13 00:24:35 UTC) #1
michaeln
i mostly have style comments https://codereview.chromium.org/70683002/diff/1/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/70683002/diff/1/content/browser/service_worker/service_worker_registration.h#newcode22 content/browser/service_worker/service_worker_registration.h:22: // This class acts ...
7 years, 1 month ago (2013-11-13 01:53:23 UTC) #2
alecflett
https://codereview.chromium.org/70683002/diff/1/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/70683002/diff/1/content/browser/service_worker/service_worker_registration.h#newcode30 content/browser/service_worker/service_worker_registration.h:30: int64 id() const { return registration_id_; } On 2013/11/13 ...
7 years, 1 month ago (2013-11-13 18:28:23 UTC) #3
michaeln
https://codereview.chromium.org/70683002/diff/120001/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/70683002/diff/120001/content/browser/service_worker/service_worker_registration.h#newcode51 content/browser/service_worker/service_worker_registration.h:51: return active_version_.get(); > And does ServiceWorkerVersion* work as a ...
7 years, 1 month ago (2013-11-14 00:27:33 UTC) #4
alecflett
https://codereview.chromium.org/70683002/diff/120001/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/70683002/diff/120001/content/browser/service_worker/service_worker_registration.h#newcode51 content/browser/service_worker/service_worker_registration.h:51: return active_version_.get(); On 2013/11/14 00:27:33, michaeln wrote: > > ...
7 years, 1 month ago (2013-11-14 18:35:46 UTC) #5
michaeln
https://codereview.chromium.org/70683002/diff/190001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/70683002/diff/190001/content/browser/service_worker/service_worker_registration.cc#newcode23 content/browser/service_worker/service_worker_registration.cc:23: Shutdown(); not sure this call needs to be here, ...
7 years, 1 month ago (2013-11-14 22:30:55 UTC) #6
michaeln
https://codereview.chromium.org/70683002/diff/190001/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/70683002/diff/190001/content/browser/service_worker/service_worker_registration.h#newcode17 content/browser/service_worker/service_worker_registration.h:17: nit: extra blank line
7 years, 1 month ago (2013-11-14 22:44:08 UTC) #7
alecflett
While I personally believe this makes our code less safe and more error prone, in ...
7 years, 1 month ago (2013-11-15 01:51:39 UTC) #8
michaeln
lgtm (thnx)
7 years, 1 month ago (2013-11-15 20:25:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/70683002/270001
7 years, 1 month ago (2013-11-15 22:56:48 UTC) #10
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=36668
7 years, 1 month ago (2013-11-16 00:08:10 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alecflett@chromium.org/70683002/270001
7 years, 1 month ago (2013-11-16 03:13:50 UTC) #12
kinuko
lgtm2, and a few nits while it's stuck in CQ :) https://codereview.chromium.org/70683002/diff/270001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): ...
7 years, 1 month ago (2013-11-18 02:18:24 UTC) #13
commit-bot: I haz the power
Change committed as 235639
7 years, 1 month ago (2013-11-18 06:14:42 UTC) #14
alecflett
7 years, 1 month ago (2013-11-18 17:50:07 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/70683002/diff/270001/content/browser/service_...
File content/browser/service_worker/service_worker_version.h (right):

https://codereview.chromium.org/70683002/diff/270001/content/browser/service_...
content/browser/service_worker/service_worker_version.h:51: class CONTENT_EXPORT
ServiceWorkerVersion
On 2013/11/18 02:18:24, kinuko wrote:
> nit: Do we really need to export all these classes?

Yep, in order to write unit tests..I feel like CONTENT_EXPORT really needs to be
split into CONTENT_EXPORT and CONTENT_UNITTEST_EXPORT or something, since I've
done this with every class!

https://codereview.chromium.org/70683002/diff/270001/content/browser/service_...
content/browser/service_worker/service_worker_version.h:61: friend class
base::RefCounted<ServiceWorkerVersion>;
On 2013/11/18 02:18:24, kinuko wrote:
> style-nit: can you move this line right after private: / before dtor

Sure, I'll take care of this in the next patch, hopefully up for review today
(http://crrev.com/62203007)

Powered by Google App Engine
This is Rietveld 408576698