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

Issue 10696069: Add the methods to change and get a posix file permission to file_util. (Closed)

Created:
8 years, 5 months ago by yoshiki
Modified:
8 years, 5 months ago
Reviewers:
brettw, satorux1, Evan Stade
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org
Visibility:
Public.

Description

Add the methods to change and get a posix file permission to file_util. BUG=134821, 134820 TEST=both base_unittests:FileUtilTest.* and unit_tests:Gdata* pass

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Remove gdata part from this chengelist. #

Total comments: 16

Patch Set 4 : Review fix #

Total comments: 6

Patch Set 5 : Review fix & sync #

Patch Set 6 : Review fix & sync #

Patch Set 7 : a #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -19 lines) Patch
base/file_util.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
base/file_util_posix.cc View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
base/file_util_unittest.cc View 1 2 3 4 4 chunks +167 lines, -19 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
satorux1
please split into two patches: 1) base changes 2) gdata changes. that'd be cleaner. btw, ...
8 years, 5 months ago (2012-07-02 16:07:35 UTC) #1
yoshiki
brettw, estade: Could you take a look? I think you are familier with file_util_posix.cc. satorux: ...
8 years, 5 months ago (2012-07-02 19:12:47 UTC) #2
Evan Stade
seems ok to me, but I am not an owner.
8 years, 5 months ago (2012-07-03 01:41:06 UTC) #3
satorux1
http://codereview.chromium.org/10696069/diff/9001/base/file_util.h File base/file_util.h (right): http://codereview.chromium.org/10696069/diff/9001/base/file_util.h#newcode200 base/file_util.h:200: // Read the permission of the given |path|. |mode| ...
8 years, 5 months ago (2012-07-03 06:16:55 UTC) #4
satorux1
http://codereview.chromium.org/10696069/diff/9001/base/file_util_posix.cc File base/file_util_posix.cc (right): http://codereview.chromium.org/10696069/diff/9001/base/file_util_posix.cc#newcode480 base/file_util_posix.cc:480: if (CallLstat(path.value().c_str(), &stat_buf) != 0) On 2012/07/03 06:16:55, satorux1 ...
8 years, 5 months ago (2012-07-03 06:22:36 UTC) #5
satorux1
http://codereview.chromium.org/10696069/diff/9001/base/file_util_posix.cc File base/file_util_posix.cc (right): http://codereview.chromium.org/10696069/diff/9001/base/file_util_posix.cc#newcode487 base/file_util_posix.cc:487: if (chmod(path.value().c_str(), updated_mode_bits) != 0) please use HANDLE_EINTR when ...
8 years, 5 months ago (2012-07-03 06:23:29 UTC) #6
yoshiki
brettw: could you take a look and approve check-in? satorux, estade: Thanks for review! http://codereview.chromium.org/10696069/diff/9001/base/file_util.h ...
8 years, 5 months ago (2012-07-04 07:57:57 UTC) #7
satorux1
http://codereview.chromium.org/10696069/diff/13002/base/file_util.h File base/file_util.h (right): http://codereview.chromium.org/10696069/diff/13002/base/file_util.h#newcode205 base/file_util.h:205: FILE_PERMISSION_OTHERS_MASK = 00007, Not sure if thees masks are ...
8 years, 5 months ago (2012-07-04 16:10:41 UTC) #8
yoshiki
8 years, 5 months ago (2012-07-09 23:44:10 UTC) #9
Fixed reviews, but something error happens and I can't upload the patch anymore.
So I've closed this and created a new issue:
https://chromiumcodereview.appspot.com/10756020/

http://codereview.chromium.org/10696069/diff/13002/base/file_util.h
File base/file_util.h (right):

http://codereview.chromium.org/10696069/diff/13002/base/file_util.h#newcode205
base/file_util.h:205: FILE_PERMISSION_OTHERS_MASK       = 00007,
These are used at file_util_unittest.cc. Keeping.

On 2012/07/04 16:10:41, satorux1 wrote:
> Not sure if thees masks are needed. maybe remove?

http://codereview.chromium.org/10696069/diff/13002/base/file_util.h#newcode207
base/file_util.h:207: FILE_PERMISSION_READ_BY_USER      = 00400,
On 2012/07/04 16:10:41, satorux1 wrote:
> Use sys/stat.h constants?
> FILE_PERMISSION_READ_BY_USER = S_IRUSR

Done.

http://codereview.chromium.org/10696069/diff/13002/base/file_util.h#newcode229
base/file_util.h:229: int mode_bits_to_clear);
On 2012/07/04 16:10:41, satorux1 wrote:
> This function seems to be unnecessary as public API. Move this to the
> unittest.cc file?

Done.

Powered by Google App Engine
This is Rietveld 408576698