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

Issue 93513002: Base: Move platform_file.* to files/file.* (Closed)

Created:
7 years ago by rvargas (doing something else)
Modified:
6 years, 11 months ago
Reviewers:
brettw, Nico
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Base: Move platform_file.* to files/file.* PlatformFile has grown beyond the initial expectations and it doesn't make sense to continue supporting individual function wrappers instead of a proper file class. BUG=322664 TEST=base_unittests R=brettw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238504

Patch Set 1 #

Total comments: 6

Patch Set 2 : SetTime -> SetTimes #

Patch Set 3 : Rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+673 lines, -709 lines) Patch
M base/base.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 2 chunks +4 lines, -0 lines 0 comments Download
M base/files/file.h View 1 2 chunks +246 lines, -250 lines 2 comments Download
M base/files/file.cc View 1 chunk +43 lines, -10 lines 0 comments Download
M base/files/file_posix.cc View 1 2 11 chunks +128 lines, -123 lines 0 comments Download
M base/files/file_unittest.cc View 1 8 chunks +135 lines, -209 lines 0 comments Download
M base/files/file_win.cc View 1 7 chunks +111 lines, -117 lines 0 comments Download
M base/platform_file.h View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
rvargas (doing something else)
I'm moving the review here (from https://codereview.chromium.org/82963004/) because rietveld/git are acting up a little after ...
7 years ago (2013-11-28 02:07:21 UTC) #1
brettw
Just some minor questions. https://codereview.chromium.org/93513002/diff/1/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/93513002/diff/1/base/files/file.h#newcode136 base/files/file.h:136: File(); Do we need a ...
7 years ago (2013-12-02 19:03:07 UTC) #2
rvargas (doing something else)
Thanks https://codereview.chromium.org/93513002/diff/1/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/93513002/diff/1/base/files/file.h#newcode136 base/files/file.h:136: File(); On 2013/12/02 19:03:07, brettw wrote: > Do ...
7 years ago (2013-12-02 20:40:12 UTC) #3
brettw
LGTM. Your const reasoning sounds reasonable, I wonder if we should add that description to ...
7 years ago (2013-12-02 20:44:25 UTC) #4
rvargas (doing something else)
On 2013/12/02 20:44:25, brettw wrote: > LGTM. > > Your const reasoning sounds reasonable, I ...
7 years ago (2013-12-03 00:34:05 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rvargas@chromium.org/93513002/20001
7 years ago (2013-12-03 00:35:17 UTC) #6
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=195813
7 years ago (2013-12-03 04:17:51 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rvargas@chromium.org/93513002/40001
7 years ago (2013-12-03 18:53:04 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rvargas@chromium.org/93513002/40001
7 years ago (2013-12-03 19:17:04 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rvargas@chromium.org/93513002/40001
7 years ago (2013-12-03 23:46:25 UTC) #10
commit-bot: I haz the power
Change committed as 238504
7 years ago (2013-12-04 00:46:35 UTC) #11
Nico
https://codereview.chromium.org/93513002/diff/40001/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/93513002/diff/40001/base/files/file.h#newcode172 base/files/file.h:172: Error error() const { return error_; } This looks ...
6 years, 11 months ago (2014-01-08 03:28:38 UTC) #12
rvargas (doing something else)
https://codereview.chromium.org/93513002/diff/40001/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/93513002/diff/40001/base/files/file.h#newcode172 base/files/file.h:172: Error error() const { return error_; } On 2014/01/08 ...
6 years, 11 months ago (2014-01-08 03:42:07 UTC) #13
Nico
6 years, 11 months ago (2014-01-08 03:46:28 UTC) #14
error_details()?


On Tue, Jan 7, 2014 at 7:42 PM, <rvargas@chromium.org> wrote:

>
> https://codereview.chromium.org/93513002/diff/40001/base/files/file.h
> File base/files/file.h (right):
>
> https://codereview.chromium.org/93513002/diff/40001/base/
> files/file.h#newcode172
> base/files/file.h:172: Error error() const { return error_; }
> On 2014/01/08 03:28:38, Nico wrote:
>
>> This looks like an error-prone api. Quick, what does this do:
>>
>
>     File my_file = ...;
>>    if (my_file.error()) {
>>      // Do stuff here.
>>    }
>>
>
>  Turns out that "Do stuff here" is executed if there's NO error, since
>>
> error()
>
>> returns an Error, not a bool, and enum value 0, the false value is
>>
> FILE_OK.
>
>  This method needs to be renamed. (error_code() or something)
>>
>
> yeah... that is an incorrect pattern no mater what error() is named, as
> the thing to check is not the error code but the state of the object
> itself:
>
> File my_file(...);
> if (my_file.IsValid()) {
>   // do something
> }
>
> This method is just a way for _really_ interested parties to find out
> what happened, and it only refers to opening the file, not to further
> operations (Read etc).
>
> I'm open to suggestions of how to express that directly on the name :)
>
> https://codereview.chromium.org/93513002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698