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

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed)

Created:
9 years, 10 months ago by ericu
Modified:
8 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Add initial code to do filename munging in the FileSystem. To start off with, it's all turned off and only part of it is implemented. We can't turn it on until it can detect and migrate older data. BUG=71635 TEST=none yet.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 33

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Patch Set 25 : '' #

Patch Set 26 : '' #

Patch Set 27 : '' #

Patch Set 28 : '' #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+1554 lines, -726 lines) Patch
M base/format_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/file_system/browser_file_system_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +6 lines, -2 lines 0 comments Download
M webkit/fileapi/file_system_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +8 lines, -1 line 0 comments Download
A webkit/fileapi/file_system_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +132 lines, -0 lines 0 comments Download
A webkit/fileapi/file_system_file_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +251 lines, -0 lines 0 comments Download
A + webkit/fileapi/file_system_file_util_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 6 chunks +41 lines, -105 lines 0 comments Download
A + webkit/fileapi/file_system_file_util_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 13 chunks +184 lines, -578 lines 6 comments Download
M webkit/fileapi/file_system_operation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +4 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_operation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 17 chunks +49 lines, -28 lines 1 comment Download
A webkit/fileapi/file_system_operation_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +32 lines, -0 lines 0 comments Download
M webkit/fileapi/file_system_path_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -5 lines 0 comments Download
M webkit/fileapi/file_system_path_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -1 line 0 comments Download
M webkit/fileapi/file_system_path_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -4 lines 0 comments Download
A webkit/fileapi/obfuscated_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +46 lines, -0 lines 0 comments Download
A webkit/fileapi/obfuscated_file_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +138 lines, -0 lines 0 comments Download
A webkit/fileapi/obfuscated_name_map.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +85 lines, -0 lines 1 comment Download
A webkit/fileapi/obfuscated_name_map.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +309 lines, -0 lines 1 comment Download
A webkit/fileapi/path_obfuscator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +68 lines, -0 lines 0 comments Download
A webkit/fileapi/path_obfuscator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +160 lines, -0 lines 0 comments Download
M webkit/fileapi/webkit_fileapi.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
ericu
Don't panic. This isn't going to go in as a single changelist. This is my ...
9 years, 10 months ago (2011-02-09 00:11:17 UTC) #1
kinuko
I have only take a really quick glance of some of files, but here's my ...
9 years, 10 months ago (2011-02-09 02:58:38 UTC) #2
michaeln
Definitely want some unittests for the the Obfuscated[Path|Name] classes. http://codereview.chromium.org/6286038/diff/83001/webkit/fileapi/obfuscated_file_util.h File webkit/fileapi/obfuscated_file_util.h (right): http://codereview.chromium.org/6286038/diff/83001/webkit/fileapi/obfuscated_file_util.h#newcode15 webkit/fileapi/obfuscated_file_util.h:15: ...
9 years, 10 months ago (2011-02-11 00:03:34 UTC) #3
ericu
http://codereview.chromium.org/6286038/diff/83001/webkit/fileapi/obfuscated_file_util.h File webkit/fileapi/obfuscated_file_util.h (right): http://codereview.chromium.org/6286038/diff/83001/webkit/fileapi/obfuscated_file_util.h#newcode15 webkit/fileapi/obfuscated_file_util.h:15: namespace obfuscated_file_util { On 2011/02/11 00:03:34, michaeln wrote: > ...
9 years, 10 months ago (2011-02-11 01:57:47 UTC) #4
darin (slow to review)
http://codereview.chromium.org/6286038/diff/83001/base/file_util_proxy_base.h File base/file_util_proxy_base.h (right): http://codereview.chromium.org/6286038/diff/83001/base/file_util_proxy_base.h#newcode17 base/file_util_proxy_base.h:17: class FileUtilProxyBase { what's the point of this base ...
9 years, 10 months ago (2011-02-11 18:16:10 UTC) #5
ericu
On Fri, Feb 11, 2011 at 10:16 AM, <darin@chromium.org> wrote: > > http://codereview.chromium.org/6286038/diff/83001/base/file_util_proxy_base.h > File ...
9 years, 10 months ago (2011-02-12 00:05:48 UTC) #6
ericu
I've uploaded a new version. Kinuko+Dai: I'd appreciate it if you could take a look ...
9 years, 10 months ago (2011-02-19 02:19:22 UTC) #7
Dai Mikurube (google.com)
On 2011/02/19 02:19:22, ericu wrote: > I've uploaded a new version. Kinuko+Dai: > I'd appreciate ...
9 years, 10 months ago (2011-02-21 07:10:40 UTC) #8
Dai Mikurube (google.com)
On 2011/02/21 07:10:40, Dai Mikurube wrote: > On 2011/02/19 02:19:22, ericu wrote: > > I've ...
9 years, 10 months ago (2011-02-21 07:33:25 UTC) #9
Dai Mikurube (google.com)
Hi Eric, Just 2 small changes when I tried compiling. http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/obfuscated_name_map.cc File webkit/fileapi/obfuscated_name_map.cc (right): http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/obfuscated_name_map.cc#newcode141 ...
9 years, 10 months ago (2011-02-22 02:57:34 UTC) #10
Dai Mikurube (google.com)
I found that the current stacking fails (segmentation fault) with obfuscate=false and the two fixes ...
9 years, 10 months ago (2011-02-22 07:41:26 UTC) #11
Dai Mikurube (google.com)
On 2011/02/22 07:41:26, Dai Mikurube wrote: > I found that the current stacking fails (segmentation ...
9 years, 10 months ago (2011-02-22 07:45:21 UTC) #12
Dai Mikurube (google.com)
The following change looks fixing the failure. http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc File webkit/fileapi/file_system_file_util_proxy.cc (right): http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc#newcode90 webkit/fileapi/file_system_file_util_proxy.cc:90: base::FileUtilProxy::Close(message_loop_proxy_, file_handle_, ...
9 years, 10 months ago (2011-02-22 08:18:04 UTC) #13
Dai Mikurube (google.com)
On 2011/02/22 08:18:04, Dai Mikurube wrote: > The following change looks fixing the failure. > ...
9 years, 10 months ago (2011-02-22 08:32:15 UTC) #14
Dai Mikurube (google.com)
Hi Eric, Found the point. The following change fixes the failure though I'm not sure ...
9 years, 10 months ago (2011-02-22 10:13:53 UTC) #15
kinuko
http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc File webkit/fileapi/file_system_file_util_proxy.cc (right): http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc#newcode90 webkit/fileapi/file_system_file_util_proxy.cc:90: base::FileUtilProxy::Close(message_loop_proxy_, file_handle_, NULL); On 2011/02/22 10:13:53, Dai Mikurube wrote: ...
9 years, 10 months ago (2011-02-22 11:13:39 UTC) #16
Dai Mikurube (google.com)
http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc File webkit/fileapi/file_system_file_util_proxy.cc (right): http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system_file_util_proxy.cc#newcode90 webkit/fileapi/file_system_file_util_proxy.cc:90: base::FileUtilProxy::Close(message_loop_proxy_, file_handle_, NULL); On 2011/02/22 11:13:39, kinuko wrote: > ...
9 years, 10 months ago (2011-02-22 11:25:16 UTC) #17
kinuko
9 years, 10 months ago (2011-02-22 12:20:58 UTC) #18
http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system...
File webkit/fileapi/file_system_file_util_proxy.cc (right):

http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system...
webkit/fileapi/file_system_file_util_proxy.cc:17: explicit
MessageLoopRelay(fileapi::FileSystemOperationContext* context)
Can we add a comment about who owns the context?
(Looks like FSO is going to own it?)

http://codereview.chromium.org/6286038/diff/105041/webkit/fileapi/file_system...
webkit/fileapi/file_system_file_util_proxy.cc:90:
base::FileUtilProxy::Close(message_loop_proxy_, file_handle_, NULL);
On 2011/02/22 11:25:16, Dai Mikurube wrote:
> On 2011/02/22 11:13:39, kinuko wrote:
> > On 2011/02/22 10:13:53, Dai Mikurube wrote:
> > > On 2011/02/22 08:18:04, Dai Mikurube wrote:
> > > > It should be :
> > > > fileapi::FileSystemFileUtilProxy::Close(context(), message_loop_proxy_,
> > > > file_handle_, NULL);
> > > 
> > > It was opposite to the correct way. Revert it.
> > > FileSystemOperation::~FileSystemOperation is to be fixed.
> > 
> > I think the Close here should be fixed too.
> 
> We should not use fileapi::FileSystemFileUtilProxy:: functions here since we
> cannot access some members which are already destructed.
> 
> In FileSystemOperation, my change suggests base::FileUtilProxy::Close instead
of
> FileSystemFielUtilProxy::Close.
> 
> But I know using base::FileUtilProxy is not good. We need to think out another
> way.

Ah I see (here and your other comment).  But calling FileUtilProxy here alone
looks weird and might cause some problems if anything is added to
FileSystemFileUtilProxy::Close.

As for file_system_file_util(), at least can we work around by holding the
FileSystemFileUtil* pointer directly in the MessageLoopRelay instance?  (I mean,
rather than obtaining the pointer via context() each time it's called.)  The
FileSystemFileUtil instance is singleton and there should be no lifetime problem
around the FSFU pointer right?

Another question: do we need to make the context keep the pointer?
(Can't we simply do something like file_system_file_util_(...::GetInstance()) in
the constructor?)
The operation context is created by IO thread but used by FILE thread, and I
think we should keep the context as simple as possible.

Also I strongly think we should add more explicit comments about the context
owner and lifetime -- it's not very intuitive right now.

Powered by Google App Engine
This is Rietveld 408576698