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

Issue 2917793002: [GRC] Coordination Unit Key-Value Storage (Closed)

Created:
3 years, 6 months ago by matthalp
Modified:
3 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, chrome-grc-reviews_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[GRC] Coordination Unit Key-Value Storage GRC's coordination unit abstraction has been enhanced to provide an internal key-value "property store" that can be used to store *interesting* runtime information relevant to what the coordination unit is tracking. In its current form, the key-value store consists of an enum-based key and a base::Value value. Using an enum for the key helps to enforce isolation between the property store users, while the base::Value allows the property store to work for a variety of different types. *** The final key-value pair type is still being iterated upon *** While the key-value store can be accessed through a member accessor, it is intended to be used through: - CoordinationUnitImpl::SetProperty to set properties - CoordinationUnitImpl::GetProperty to access properties - CoordinationUnitImpl::ClearProperty to clear properties Additionally, we extend the CoordinationUnitImpl mojo interface to allow code outside of GRC to set properties. The interface may be extended in the future to support the other operations, but that is not an immediate concern here. This CL depends on: https://codereview.chromium.org/2914003002 R=oysteine@chromium.org BUG=724306 Review-Url: https://codereview.chromium.org/2917793002 Cr-Commit-Position: refs/heads/master@{#477317} Committed: https://chromium.googlesource.com/chromium/src/+/ea83d48cabb2932915f6d812f0ca83c89c0c5add

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address review feedback #

Total comments: 6

Patch Set 3 : Rebase #

Patch Set 4 : Address reviewer feedback #

Total comments: 4

Patch Set 5 : Fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -0 lines) Patch
M services/resource_coordinator/coordination_unit/coordination_unit_impl.h View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_impl.cc View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_impl_unittest.cc View 1 2 3 2 chunks +32 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/interfaces/coordination_unit.mojom View 1 2 3 4 3 chunks +17 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (10 generated)
matthalp
3 years, 6 months ago (2017-06-01 16:44:43 UTC) #1
oystein (OOO til 10th of July)
https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h File services/resource_coordinator/coordination_unit/coordination_unit_impl.h (right): https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h#newcode40 services/resource_coordinator/coordination_unit/coordination_unit_impl.h:40: void SetStorageProperty(mojom::StoragePairPtr pair) override; General feedback: "Storage" usually in ...
3 years, 6 months ago (2017-06-01 18:24:27 UTC) #2
matthalp
https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h File services/resource_coordinator/coordination_unit/coordination_unit_impl.h (right): https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h#newcode40 services/resource_coordinator/coordination_unit/coordination_unit_impl.h:40: void SetStorageProperty(mojom::StoragePairPtr pair) override; On 2017/06/01 at 18:24:27, oystein ...
3 years, 6 months ago (2017-06-01 21:27:38 UTC) #3
matthalp
On 2017/06/01 at 21:27:38, matthalp wrote: > https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h > File services/resource_coordinator/coordination_unit/coordination_unit_impl.h (right): > > https://codereview.chromium.org/2917793002/diff/1/services/resource_coordinator/coordination_unit/coordination_unit_impl.h#newcode40 ...
3 years, 6 months ago (2017-06-01 21:49:14 UTC) #5
oystein (OOO til 10th of July)
lgtm with comments https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/coordination_unit/coordination_unit_impl.cc File services/resource_coordinator/coordination_unit/coordination_unit_impl.cc (right): https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/coordination_unit/coordination_unit_impl.cc#newcode229 services/resource_coordinator/coordination_unit/coordination_unit_impl.cc:229: property_store_.erase(value_it); std::unordered_map::erase has a key_type overload, ...
3 years, 6 months ago (2017-06-01 21:52:02 UTC) #6
nasko
LGTM provided some comments are added. https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/public/interfaces/coordination_unit.mojom File services/resource_coordinator/public/interfaces/coordination_unit.mojom (right): https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/public/interfaces/coordination_unit.mojom#newcode56 services/resource_coordinator/public/interfaces/coordination_unit.mojom:56: SetProperty(Property property); Can ...
3 years, 6 months ago (2017-06-03 00:21:14 UTC) #8
matthalp
https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/coordination_unit/coordination_unit_impl.cc File services/resource_coordinator/coordination_unit/coordination_unit_impl.cc (right): https://codereview.chromium.org/2917793002/diff/20001/services/resource_coordinator/coordination_unit/coordination_unit_impl.cc#newcode229 services/resource_coordinator/coordination_unit/coordination_unit_impl.cc:229: property_store_.erase(value_it); On 2017/06/01 at 21:52:02, oystein wrote: > std::unordered_map::erase ...
3 years, 6 months ago (2017-06-06 00:32:47 UTC) #9
nasko
https://codereview.chromium.org/2917793002/diff/60001/services/resource_coordinator/public/interfaces/coordination_unit.mojom File services/resource_coordinator/public/interfaces/coordination_unit.mojom (right): https://codereview.chromium.org/2917793002/diff/60001/services/resource_coordinator/public/interfaces/coordination_unit.mojom#newcode33 services/resource_coordinator/public/interfaces/coordination_unit.mojom:33: // Storage property keys for CoordinationUnitImpl internal key-value store ...
3 years, 6 months ago (2017-06-06 01:06:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2917793002/80001
3 years, 6 months ago (2017-06-06 16:57:02 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/ea83d48cabb2932915f6d812f0ca83c89c0c5add
3 years, 6 months ago (2017-06-06 17:24:47 UTC) #20
matthalp
3 years, 6 months ago (2017-06-06 17:28:54 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/2917793002/diff/60001/services/resource_coord...
File services/resource_coordinator/public/interfaces/coordination_unit.mojom
(right):

https://codereview.chromium.org/2917793002/diff/60001/services/resource_coord...
services/resource_coordinator/public/interfaces/coordination_unit.mojom:33: //
Storage property keys for CoordinationUnitImpl internal key-value store
On 2017/06/06 at 01:06:17, nasko (slow) wrote:
> nit: End sentences with ".".

Done.

https://codereview.chromium.org/2917793002/diff/60001/services/resource_coord...
services/resource_coordinator/public/interfaces/coordination_unit.mojom:59: //
Set a property on the CoordinationUnitImpl's internal key-value store
On 2017/06/06 at 01:06:17, nasko (slow) wrote:
> nit: s/Set/Sets/

Done.

Powered by Google App Engine
This is Rietveld 408576698