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

Issue 6426001: Add 1st cut of FileSystemUsageTracker that tracks the usage changes in FileSystem API. (Closed)

Created:
9 years, 10 months ago by kinuko
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add 1st cut of FileSystemUsageTracker that tracks the usage changes in FileSystem API. For now it has no meaningful implementation yet; mostly just for defining a few interfaces. BUG= TEST=FileSystemUsageTrackerTest.DummyTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74429

Patch Set 1 : '' #

Patch Set 2 : nits fix #

Total comments: 2

Patch Set 3 : fixes #

Total comments: 20

Patch Set 4 : fixed based on comments #

Patch Set 5 : build fix for win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -29 lines) Patch
M webkit/fileapi/file_system_path_manager.h View 3 chunks +22 lines, -2 lines 0 comments Download
M webkit/fileapi/file_system_path_manager.cc View 4 chunks +36 lines, -17 lines 0 comments Download
A webkit/fileapi/file_system_usage_tracker.h View 1 2 3 1 chunk +71 lines, -0 lines 0 comments Download
A webkit/fileapi/file_system_usage_tracker.cc View 1 2 3 4 1 chunk +158 lines, -0 lines 0 comments Download
webkit/fileapi/file_system_usage_tracker_unittest.cc View 1 2 1 chunk +66 lines, -0 lines 0 comments Download
M webkit/fileapi/sandboxed_file_system_context.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M webkit/fileapi/sandboxed_file_system_context.cc View 1 2 2 chunks +4 lines, -7 lines 0 comments Download
M webkit/fileapi/webkit_fileapi.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/test_shell.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
kinuko
9 years, 10 months ago (2011-02-08 03:59:03 UTC) #1
kinuko
On 2011/02/08 03:59:03, kinuko wrote: There a few more changes I'm planning to make, but ...
9 years, 10 months ago (2011-02-08 04:40:06 UTC) #2
Paweł Hajdan Jr.
Drive-by with a tiny nit. No need to wait for me if you just convert ...
9 years, 10 months ago (2011-02-08 11:25:49 UTC) #3
kinuko
Changed the ScopedTempDir stack-allocated. Thanks as always, http://codereview.chromium.org/6426001/diff/8001/webkit/fileapi/file_system_usage_tracker_unittest.cc File webkit/fileapi/file_system_usage_tracker_unittest.cc (right): http://codereview.chromium.org/6426001/diff/8001/webkit/fileapi/file_system_usage_tracker_unittest.cc#newcode53 webkit/fileapi/file_system_usage_tracker_unittest.cc:53: scoped_ptr<ScopedTempDir> data_dir_; ...
9 years, 10 months ago (2011-02-08 13:36:12 UTC) #4
michaeln
http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc File webkit/fileapi/file_system_usage_tracker.cc (right): http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc#newcode38 webkit/fileapi/file_system_usage_tracker.cc:38: if (tracker_) can tracker_ ever be null? http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc#newcode44 webkit/fileapi/file_system_usage_tracker.cc:44: ...
9 years, 10 months ago (2011-02-09 00:25:36 UTC) #5
ericu
http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc File webkit/fileapi/file_system_usage_tracker.cc (right): http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc#newcode69 webkit/fileapi/file_system_usage_tracker.cc:69: scoped_refptr<base::MessageLoopProxy> origin_message_loop_; On 2011/02/09 00:25:36, michaeln wrote: > the ...
9 years, 10 months ago (2011-02-09 02:05:19 UTC) #6
kinuko
Thanks for your comments! Updated the patch. http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc File webkit/fileapi/file_system_usage_tracker.cc (right): http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc#newcode38 webkit/fileapi/file_system_usage_tracker.cc:38: if (tracker_) ...
9 years, 10 months ago (2011-02-09 05:22:36 UTC) #7
kinuko
http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc File webkit/fileapi/file_system_usage_tracker.cc (right): http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_usage_tracker.cc#newcode44 webkit/fileapi/file_system_usage_tracker.cc:44: void RunOnFileThread() { On 2011/02/09 05:22:36, kinuko wrote: > ...
9 years, 10 months ago (2011-02-09 05:25:59 UTC) #8
ericu
9 years, 10 months ago (2011-02-09 23:03:37 UTC) #9
LGTM

http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_...
File webkit/fileapi/file_system_usage_tracker.h (right):

http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_...
webkit/fileapi/file_system_usage_tracker.h:27: class FileSystemUsageTracker {
On 2011/02/09 05:22:36, kinuko wrote:
> On 2011/02/09 02:05:22, ericu wrote:
> > What's the lifetime of this object?  Is there guaranteed to be exactly one
per
> > profile?  Does it need to be deleted on any particular thread?  What about
> > requests in progress at destruction time?
> 
> Added comments, as I interpreted your questions as so :)
> For now it's simply owned by SandboxedFileSystemContext.  I may change this
> design a bit if I find it doesn't work.  Any advise is welcome.
> (I'll change the comment accordingly if I do so)

Great--thanks.

http://codereview.chromium.org/6426001/diff/12012/webkit/fileapi/file_system_...
webkit/fileapi/file_system_usage_tracker.h:47: void
UnregisterUsageTask(GetUsageTask* task);
On 2011/02/09 05:22:36, kinuko wrote:
> On 2011/02/09 02:05:22, ericu wrote:
> > I'd probably call these [Un]RegisterGetUsageTask, just for consistency.
> 
> Agreed, except that the method names reflect the future plan - I'm planning to
> have a base class called UsageTask. So I'd like to make them as is for now.

OK.

Powered by Google App Engine
This is Rietveld 408576698