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

Issue 11419279: Implement systemInfo.storage.onChanged event (Closed)

Created:
8 years ago by Hongbo Min
Modified:
7 years, 7 months ago
Reviewers:
benwells, Nico
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Implement systemInfo.storage.onChanged event. It provides extra option to specify which storage to be listened and the change threshold for free space change. BUG=141229 TEST=browser_tests --gtest_filter=SystemInfoStorageApiTest.*

Patch Set 1 : #

Patch Set 2 : use RunPlatformAppTest instead #

Patch Set 3 : rebase code #

Patch Set 4 : improve implementation #

Patch Set 5 : refine the testing code #

Patch Set 6 : refine browser test and code comments #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+682 lines, -242 lines) Patch
M chrome/browser/extensions/api/system_info_storage/storage_info_provider.h View 1 2 3 4 5 4 chunks +48 lines, -27 lines 3 comments Download
M chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc View 1 2 3 4 5 5 chunks +76 lines, -37 lines 5 comments Download
M chrome/browser/extensions/api/system_info_storage/storage_info_provider_unittest.cc View 1 2 3 5 chunks +100 lines, -50 lines 0 comments Download
M chrome/browser/extensions/api/system_info_storage/system_info_storage_apitest.cc View 1 2 3 4 2 chunks +38 lines, -62 lines 0 comments Download
M chrome/browser/extensions/event_names.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/event_names.cc View 1 chunk +1 line, -2 lines 0 comments Download
A chrome/browser/extensions/storage_info_observer.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/browser/extensions/system_info_event_router.h View 1 2 3 4 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/extensions/system_info_event_router.cc View 1 2 3 4 5 6 chunks +72 lines, -23 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/experimental_system_info_storage.idl View 2 chunks +38 lines, -3 lines 1 comment Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/renderer/resources/extensions/experimental.system_info_storage_custom_bindings.js View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download
M chrome/renderer/resources/renderer_resources.grd View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/systeminfo/storage/manifest.json View 1 chunk +7 lines, -2 lines 0 comments Download
D chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.html View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js View 1 2 3 4 1 chunk +158 lines, -22 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Hongbo Min
benwells@, a new patch for storage.onChanged event implementation. Pls have a review. Nico, please review ...
8 years ago (2012-12-03 02:27:04 UTC) #1
Hongbo Min
ping benwells@... Thanks.
8 years ago (2012-12-04 23:07:11 UTC) #2
benwells
My reading of this is that there are two sets of listeners / observers. One ...
8 years ago (2012-12-06 00:19:30 UTC) #3
Hongbo Min
On 2012/12/06 00:19:30, benwells wrote: > My reading of this is that there are two ...
8 years ago (2012-12-06 01:17:00 UTC) #4
Hongbo Min
On 2012/12/06 01:17:00, Hongbo Min wrote: > On 2012/12/06 00:19:30, benwells wrote: > > My ...
8 years ago (2012-12-06 06:47:45 UTC) #5
benwells
On 2012/12/06 06:47:45, Hongbo Min wrote: > On 2012/12/06 01:17:00, Hongbo Min wrote: > > ...
8 years ago (2012-12-06 06:54:23 UTC) #6
Hongbo Min
benwells@, I am also refactoring the implementation. It might be better if you could delay ...
8 years ago (2012-12-06 08:07:30 UTC) #7
Hongbo Min
benwells@, the patch is updated. The main change is to move StorageEventListener out of event ...
8 years ago (2012-12-06 15:29:43 UTC) #8
Hongbo Min
Refined patch. Pls have a review, benwells. Thanks.
8 years ago (2012-12-07 03:12:49 UTC) #9
Hongbo Min
On 2012/12/07 03:12:49, Hongbo Min wrote: > Refined patch. Pls have a review, benwells. Thanks. ...
8 years ago (2012-12-11 04:36:47 UTC) #10
benwells
Apologies for the slow review. https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc (right): https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc#newcode97 chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc:97: FreeSpaceWatcher watcher(id, threshold); This ...
8 years ago (2012-12-11 04:40:40 UTC) #11
Hongbo Min
Thanks for your comment. Will update it later. https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc File chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc (right): https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc#newcode101 chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc:101: if ...
8 years ago (2012-12-11 05:08:50 UTC) #12
benwells
On 2012/12/11 05:08:50, Hongbo Min wrote: > Thanks for your comment. Will update it later. ...
7 years, 7 months ago (2013-05-15 22:28:56 UTC) #13
Hongbo Min
7 years, 7 months ago (2013-05-16 01:17:33 UTC) #14
On 2013/05/15 22:28:56, benwells wrote:
> On 2012/12/11 05:08:50, Hongbo Min wrote:
> > Thanks for your comment. Will update it later.
> > 
> >
>
https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions...
> > File
> chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc
> > (right):
> > 
> >
>
https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions...
> >
>
chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc:101:
> > if (it->threshold == threshold)
> > On 2012/12/11 04:40:40, benwells wrote:
> > > What if two extensions start watching using the same threshold? The second
> one
> > > will be ignored: is that a problem?
> > 
> > Good catch! It will lead to the second one can not receive event after the
> first
> > one stops watching.
> > 
> >
>
https://codereview.chromium.org/11419279/diff/21001/chrome/browser/extensions...
> >
>
chrome/browser/extensions/api/system_info_storage/storage_info_provider.cc:177:
> > it->threshold /* change threshold */);
> > On 2012/12/11 04:40:40, benwells wrote:
> > > Why do we pass the threshold back in the event?
> > 
> > The SystemInfoEventRouter needs it to marshal the event name being
dispatched
> to
> > renderer process.
> 
> What's happening with this CL?

It was already done in another CL. I will close it.

Powered by Google App Engine
This is Rietveld 408576698