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

Issue 764673003: Adding CopresenceState (Closed)

Created:
6 years ago by Charlie
Modified:
6 years ago
Reviewers:
rkc, xiyuan
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding CopresenceState, a central place to track the internal state of the copresence component. Classes can register to be notified of state changes (e.g. new directives or tokens). This provides the backend for the new debug UI. BUG=420889 Committed: https://crrev.com/e8b0dbdbe00fd4cdfcc7db4fd4721ed74be4f928 Cr-Commit-Position: refs/heads/master@{#309315}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Using structs instead of protos. Fixing tests. #

Patch Set 4 : Fixing overzealous DCHECK #

Total comments: 23

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+858 lines, -165 lines) Patch
M chrome/browser/extensions/api/copresence/copresence_api_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -6 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/copresence.gypi View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M components/copresence/BUILD.gn View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M components/copresence/copresence_manager_impl.h View 1 4 chunks +15 lines, -6 lines 0 comments Download
M components/copresence/copresence_manager_impl.cc View 1 2 6 chunks +30 lines, -5 lines 0 comments Download
A components/copresence/copresence_state_impl.h View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 0 comments Download
A components/copresence/copresence_state_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +179 lines, -0 lines 0 comments Download
A components/copresence/copresence_state_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +149 lines, -0 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_handler.h View 2 chunks +3 lines, -8 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_handler_impl.h View 1 2 3 4 4 chunks +12 lines, -10 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_handler_impl.cc View 7 chunks +34 lines, -12 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +62 lines, -56 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_list.h View 1 2 3 chunks +11 lines, -3 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_list.cc View 4 chunks +14 lines, -5 lines 0 comments Download
M components/copresence/handlers/audio/audio_directive_list_unittest.cc View 1 2 4 chunks +20 lines, -18 lines 0 comments Download
M components/copresence/handlers/directive_handler_impl.h View 1 chunk +7 lines, -3 lines 0 comments Download
M components/copresence/handlers/directive_handler_impl.cc View 1 2 chunks +18 lines, -13 lines 0 comments Download
M components/copresence/handlers/directive_handler_unittest.cc View 1 2 3 4 5 chunks +18 lines, -12 lines 0 comments Download
M components/copresence/public/copresence_constants.h View 1 2 6 chunks +8 lines, -8 lines 0 comments Download
M components/copresence/public/copresence_manager.h View 2 chunks +4 lines, -0 lines 0 comments Download
A components/copresence/public/copresence_observer.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A components/copresence/public/copresence_state.h View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
M components/copresence/rpc/rpc_handler.h View 1 3 chunks +3 lines, -0 lines 0 comments Download
M components/copresence/rpc/rpc_handler.cc View 1 3 chunks +4 lines, -0 lines 0 comments Download
M components/copresence/rpc/rpc_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -0 lines 0 comments Download
A components/copresence/tokens.h View 1 2 3 4 5 6 7 8 9 1 chunk +58 lines, -0 lines 0 comments Download
A components/copresence/tokens.cc View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
Charlie
Still working on fixing the existing tests and adding a copresence_state_unittest. But this is now ...
6 years ago (2014-12-05 03:03:12 UTC) #2
rkc
Overall design looks good, I have a few nits and comments. I'll send those when ...
6 years ago (2014-12-09 18:28:30 UTC) #3
Charlie
PTAL
6 years ago (2014-12-16 20:37:37 UTC) #4
Charlie
reviewers += xiyuan in case rkc doesn't have time for a detailed review. Let's get ...
6 years ago (2014-12-18 17:09:37 UTC) #6
xiyuan
https://codereview.chromium.org/764673003/diff/60001/components/copresence/copresence_state_impl.cc File components/copresence/copresence_state_impl.cc (right): https://codereview.chromium.org/764673003/diff/60001/components/copresence/copresence_state_impl.cc#newcode93 components/copresence/copresence_state_impl.cc:93: UpdateToken(token, &transmitted_tokens_[token.id]); General question: when would a token be ...
6 years ago (2014-12-18 18:10:52 UTC) #7
rkc
https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc File chrome/browser/extensions/api/copresence/copresence_api_unittest.cc (right): https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc#newcode79 chrome/browser/extensions/api/copresence/copresence_api_unittest.cc:79: state_(new CopresenceStateImpl) {} Why aren't we using a stub ...
6 years ago (2014-12-18 18:12:10 UTC) #8
Charlie
https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc File chrome/browser/extensions/api/copresence/copresence_api_unittest.cc (right): https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc#newcode79 chrome/browser/extensions/api/copresence/copresence_api_unittest.cc:79: state_(new CopresenceStateImpl) {} On 2014/12/18 18:12:09, Rahul Chaturvedi wrote: ...
6 years ago (2014-12-19 03:53:34 UTC) #9
xiyuan
lgtm https://codereview.chromium.org/764673003/diff/80001/components/copresence/copresence_state_impl.h File components/copresence/copresence_state_impl.h (right): https://codereview.chromium.org/764673003/diff/80001/components/copresence/copresence_state_impl.h#newcode38 components/copresence/copresence_state_impl.h:38: const override; nit: wrap transimitted_tokens() as well? It ...
6 years ago (2014-12-19 04:03:02 UTC) #10
Charlie
https://codereview.chromium.org/764673003/diff/80001/components/copresence/copresence_state_impl.h File components/copresence/copresence_state_impl.h (right): https://codereview.chromium.org/764673003/diff/80001/components/copresence/copresence_state_impl.h#newcode38 components/copresence/copresence_state_impl.h:38: const override; On 2014/12/19 04:03:01, xiyuan wrote: > nit: ...
6 years ago (2014-12-19 05:25:39 UTC) #11
Charlie
https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc File chrome/browser/extensions/api/copresence/copresence_api_unittest.cc (right): https://codereview.chromium.org/764673003/diff/60001/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc#newcode79 chrome/browser/extensions/api/copresence/copresence_api_unittest.cc:79: state_(new CopresenceStateImpl) {} On 2014/12/19 03:53:33, Charlie wrote: > ...
6 years ago (2014-12-19 07:06:44 UTC) #12
rkc
lgtm
6 years ago (2014-12-19 19:09:04 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/764673003/180001
6 years ago (2014-12-19 22:50:30 UTC) #15
commit-bot: I haz the power
Committed patchset #10 (id:180001)
6 years ago (2014-12-20 00:50:55 UTC) #16
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/e8b0dbdbe00fd4cdfcc7db4fd4721ed74be4f928 Cr-Commit-Position: refs/heads/master@{#309315}
6 years ago (2014-12-20 00:52:02 UTC) #17
benwells
6 years ago (2014-12-22 07:15:33 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:180001) has been created in
https://codereview.chromium.org/824593003/ by benwells@chromium.org.

The reason for reverting is: AudioDirectiveListTest.AddDirectiveMultiple started
failing consistently on the linux valgrind memory fyi bot after this change.

See
http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28v...
for details.

I can't see any good reason why it would be failing in this way, on this bot,
after this change, but I don't have time to investigate deeply..

Powered by Google App Engine
This is Rietveld 408576698