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

Issue 444513005: Add the Copresence API. (Closed)

Created:
6 years, 4 months ago by rkc
Modified:
6 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org, Charlie, Daniel Erat, xiyuan
Project:
chromium
Visibility:
Public.

Description

Add the Copresence API. This CL adds the main Copresence API. This CL is tracking, https://codereview.chromium.org/438513002. This CL also requires https://codereview.chromium.org/419073002 and https://codereview.chromium.org/433283002 to land to be fully functional. API tests for this API are being worked on by ckehoe@ and we'll be sending a follow on CL tracking this one very soon. Reviews requested, xiyuan@ - General review. kalman@ - API review. isherman@ - histograms.xml OWNERs review. R=derat@chromium.org, isherman@chromium.org, kalman@chromium.org, xiyuan@chromium.org BUG=365493 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288230

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 46

Patch Set 5 : #

Patch Set 6 : #

Total comments: 37

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 16

Patch Set 11 : #

Patch Set 12 : #

Total comments: 6

Patch Set 13 : #

Total comments: 2

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+758 lines, -51 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/copresence/chrome_whispernet_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +27 lines, -22 lines 0 comments Download
A + chrome/browser/extensions/api/copresence/OWNERS View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A chrome/browser/extensions/api/copresence/copresence_api.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +101 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/copresence/copresence_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +171 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/copresence/copresence_translations.h View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/copresence/copresence_translations.cc View 1 2 3 4 5 6 7 1 chunk +223 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/api/copresence_private/OWNERS View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/copresence_private/copresence_private_api.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/copresence_private/copresence_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -16 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -0 lines 2 comments Download
M chrome/common/extensions/api/_api_features.json View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/api.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A chrome/common/extensions/api/copresence.idl View 1 2 3 4 5 6 7 8 9 1 chunk +143 lines, -0 lines 0 comments Download
A chrome/common/extensions/docs/templates/public/apps/copresence.html View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/permissions/chrome_api_permissions.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/copresence.gypi View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/copresence/public/copresence_client_delegate.h View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/permissions/api_permission.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/permissions/permission_message.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
rkc
6 years, 4 months ago (2014-08-05 03:17:36 UTC) #1
Pam (message me for reviews)
c/b/prefs/* lgtm
6 years, 4 months ago (2014-08-05 06:27:38 UTC) #2
rkc
+derat@,+xiyuan@ for FYI (or any comments they may have).
6 years, 4 months ago (2014-08-05 07:01:50 UTC) #3
not at google - send to devlin
I'm happy to review the general infrastructure of this, but given you've added ckehoe@ as ...
6 years, 4 months ago (2014-08-05 16:58:40 UTC) #4
not at google - send to devlin
Had a quick skim of the code outside of chrome/browser/extensions/api/ which led me to the ...
6 years, 4 months ago (2014-08-05 17:09:55 UTC) #5
rkc
I've asked xiyuan@ to look at the general review since he is familiar with all ...
6 years, 4 months ago (2014-08-05 18:06:25 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode116 chrome/browser/extensions/api/copresence/copresence_api.cc:116: const std::string CopresenceService::GetDeviceId() const { On 2014/08/05 18:06:24, Rahul ...
6 years, 4 months ago (2014-08-05 18:17:21 UTC) #7
Ilya Sherman
histograms lgtm
6 years, 4 months ago (2014-08-05 18:46:51 UTC) #8
xiyuan
Mostly good. https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode13 chrome/browser/extensions/api/copresence/copresence_api.cc:13: #include "chrome/browser/profiles/profile.h" nit: seems not used https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode75 ...
6 years, 4 months ago (2014-08-05 21:02:35 UTC) #9
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode151 chrome/browser/extensions/api/copresence/copresence_api.cc:151: return RespondNow(BadMessage()); nit: multi-line condition should have {} around ...
6 years, 4 months ago (2014-08-05 21:05:39 UTC) #10
rkc
Removing battre@ and pam@ since I removed the prefs change. https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/60001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode13 ...
6 years, 4 months ago (2014-08-05 22:25:23 UTC) #11
xiyuan
lgtm
6 years, 4 months ago (2014-08-05 22:30:04 UTC) #12
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/60001/chrome/common/extensions/api/copresence.idl File chrome/common/extensions/api/copresence.idl (right): https://codereview.chromium.org/444513005/diff/60001/chrome/common/extensions/api/copresence.idl#newcode129 chrome/common/extensions/api/copresence.idl:129: // the api key, apps on any platform that ...
6 years, 4 months ago (2014-08-05 22:38:14 UTC) #13
rkc
https://codereview.chromium.org/444513005/diff/60001/chrome/common/extensions/api/copresence.idl File chrome/common/extensions/api/copresence.idl (right): https://codereview.chromium.org/444513005/diff/60001/chrome/common/extensions/api/copresence.idl#newcode129 chrome/common/extensions/api/copresence.idl:129: // the api key, apps on any platform that ...
6 years, 4 months ago (2014-08-05 23:06:29 UTC) #14
rkc
Tests for the API are in this CL, https://codereview.chromium.org/441103002/
6 years, 4 months ago (2014-08-06 20:26:58 UTC) #15
Daniel Erat
high-level question: would this api ever make sense for non-chrome binaries like app_shell? if so, ...
6 years, 4 months ago (2014-08-06 22:59:38 UTC) #16
rkc
https://codereview.chromium.org/444513005/diff/100001/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc File chrome/browser/copresence/chrome_whispernet_client_browsertest.cc (right): https://codereview.chromium.org/444513005/diff/100001/chrome/browser/copresence/chrome_whispernet_client_browsertest.cc#newcode105 chrome/browser/copresence/chrome_whispernet_client_browsertest.cc:105: ASSERT_TRUE(extensions::GetWhispernetClient(context_)); On 2014/08/06 22:59:36, Daniel Erat wrote: > nit: ...
6 years, 4 months ago (2014-08-07 02:18:34 UTC) #17
rkc
https://codereview.chromium.org/444513005/diff/100001/chrome/browser/extensions/api/copresence/copresence_translations.cc File chrome/browser/extensions/api/copresence/copresence_translations.cc (right): https://codereview.chromium.org/444513005/diff/100001/chrome/browser/extensions/api/copresence/copresence_translations.cc#newcode25 chrome/browser/extensions/api/copresence/copresence_translations.cc:25: extensions::api::copresence::Strategy* strategy) { On 2014/08/06 22:59:37, Daniel Erat wrote: ...
6 years, 4 months ago (2014-08-07 02:42:36 UTC) #18
rkc
On 2014/08/06 22:59:38, Daniel Erat wrote: > high-level question: would this api ever make sense ...
6 years, 4 months ago (2014-08-07 02:51:16 UTC) #19
Daniel Erat
thanks for the explanation; lgtm
6 years, 4 months ago (2014-08-07 18:12:30 UTC) #20
rkc
Added [nodoc] to setApiKeys. Spoke to kalman@ offline about this. setApiKeys is not the permanent ...
6 years, 4 months ago (2014-08-07 19:30:13 UTC) #21
not at google - send to devlin
nitty things left. https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode71 chrome/browser/extensions/api/copresence/copresence_api.cc:71: std::string app_id = GetCopresenceService(browser_context_) I don't ...
6 years, 4 months ago (2014-08-07 20:41:19 UTC) #22
rkc
https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode71 chrome/browser/extensions/api/copresence/copresence_api.cc:71: std::string app_id = GetCopresenceService(browser_context_) On 2014/08/07 20:41:18, kalman wrote: ...
6 years, 4 months ago (2014-08-07 21:43:03 UTC) #23
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_util.h File chrome/browser/extensions/api/copresence/copresence_util.h (right): https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_util.h#newcode20 chrome/browser/extensions/api/copresence/copresence_util.h:20: On 2014/08/07 21:43:02, Rahul Chaturvedi wrote: > On 2014/08/07 ...
6 years, 4 months ago (2014-08-07 21:47:44 UTC) #24
rkc
https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_util.h File chrome/browser/extensions/api/copresence/copresence_util.h (right): https://codereview.chromium.org/444513005/diff/180001/chrome/browser/extensions/api/copresence/copresence_util.h#newcode20 chrome/browser/extensions/api/copresence/copresence_util.h:20: On 2014/08/07 21:47:43, kalman wrote: > On 2014/08/07 21:43:02, ...
6 years, 4 months ago (2014-08-07 22:03:45 UTC) #25
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/220001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/220001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode37 chrome/browser/extensions/api/copresence/copresence_api.cc:37: content::BrowserContext* browser_context) { make both of these instance methods, ...
6 years, 4 months ago (2014-08-07 22:23:38 UTC) #26
rkc
https://codereview.chromium.org/444513005/diff/220001/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/220001/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode37 chrome/browser/extensions/api/copresence/copresence_api.cc:37: content::BrowserContext* browser_context) { On 2014/08/07 22:23:38, kalman wrote: > ...
6 years, 4 months ago (2014-08-07 22:32:37 UTC) #27
not at google - send to devlin
https://codereview.chromium.org/444513005/diff/220002/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/220002/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode136 chrome/browser/extensions/api/copresence/copresence_api.cc:136: SubscriptionToAppMap& apps_by_subscription_id = inline this?
6 years, 4 months ago (2014-08-07 22:41:27 UTC) #28
not at google - send to devlin
(lgtm)
6 years, 4 months ago (2014-08-07 22:41:34 UTC) #29
rkc
https://codereview.chromium.org/444513005/diff/220002/chrome/browser/extensions/api/copresence/copresence_api.cc File chrome/browser/extensions/api/copresence/copresence_api.cc (right): https://codereview.chromium.org/444513005/diff/220002/chrome/browser/extensions/api/copresence/copresence_api.cc#newcode136 chrome/browser/extensions/api/copresence/copresence_api.cc:136: SubscriptionToAppMap& apps_by_subscription_id = On 2014/08/07 22:41:27, kalman wrote: > ...
6 years, 4 months ago (2014-08-07 22:44:33 UTC) #30
rkc
The CQ bit was checked by rkc@chromium.org
6 years, 4 months ago (2014-08-07 22:45:33 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rkc@chromium.org/444513005/250001
6 years, 4 months ago (2014-08-07 23:01:33 UTC) #32
rkc
The CQ bit was unchecked by rkc@chromium.org
6 years, 4 months ago (2014-08-07 23:34:34 UTC) #33
rkc
The CQ bit was checked by rkc@chromium.org
6 years, 4 months ago (2014-08-07 23:42:05 UTC) #34
rkc
The CQ bit was checked by rkc@chromium.org
6 years, 4 months ago (2014-08-08 01:49:19 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rkc@chromium.org/444513005/290001
6 years, 4 months ago (2014-08-08 01:52:25 UTC) #36
rkc
Committed patchset #16 manually as 288230 (presubmit successful).
6 years, 4 months ago (2014-08-08 06:36:11 UTC) #37
brettw
https://codereview.chromium.org/444513005/diff/290001/chrome/chrome_browser_extensions.gypi File chrome/chrome_browser_extensions.gypi (right): https://codereview.chromium.org/444513005/diff/290001/chrome/chrome_browser_extensions.gypi#newcode988 chrome/chrome_browser_extensions.gypi:988: '../components/components.gyp:copresence', This updated the GYP build but didn't update ...
6 years, 4 months ago (2014-08-20 17:03:23 UTC) #38
Charlie
6 years, 4 months ago (2014-08-20 17:22:53 UTC) #39
Message was sent while issue was closed.
https://codereview.chromium.org/444513005/diff/290001/chrome/chrome_browser_e...
File chrome/chrome_browser_extensions.gypi (right):

https://codereview.chromium.org/444513005/diff/290001/chrome/chrome_browser_e...
chrome/chrome_browser_extensions.gypi:988:
'../components/components.gyp:copresence',
On 2014/08/20 17:03:23, brettw wrote:
> This updated the GYP build but didn't update the GN build. The build works if
> the copresence proto happens to be built before this target (which I guess is
> the case on the bots, at least for the incremental builds they do) but is not
> the case necessarily and this fails on some systems.
> 
> If you add dependencies, please be sure to look for the corresponding thing in
> the GN build. I'll fix this in a patch I'm working on.

Sorry about that. Looks like the GN build does fail on my machine. I'll try to
check it more regularly, although we really should get the incremental builds to
fail in cases like these.

Powered by Google App Engine
This is Rietveld 408576698