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

Issue 3165050: Change the FileUtilProxy callbacks to report error codes instead of booleans.... (Closed)

Created:
10 years, 4 months ago by dumi
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Change the FileUtilProxy callbacks to report error codes instead of booleans. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57228

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -41 lines) Patch
M base/file_util_proxy.h View 1 chunk +11 lines, -11 lines 0 comments Download
M base/file_util_proxy.cc View 11 chunks +43 lines, -28 lines 2 comments Download
M base/platform_file.h View 1 chunk +9 lines, -1 line 2 comments Download
M chrome/browser/renderer_host/redirect_to_file_resource_handler.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/redirect_to_file_resource_handler.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
dumi
10 years, 4 months ago (2010-08-21 00:51:08 UTC) #1
darin (slow to review)
LGTM http://codereview.chromium.org/3165050/diff/5001/6001 File base/file_util_proxy.cc (right): http://codereview.chromium.org/3165050/diff/5001/6001#newcode42 base/file_util_proxy.cc:42: int ErrorCode() { nit: consider naming these set_error_code() ...
10 years, 4 months ago (2010-08-24 17:43:14 UTC) #2
dumi
http://codereview.chromium.org/3165050/diff/5001/6001 File base/file_util_proxy.cc (right): http://codereview.chromium.org/3165050/diff/5001/6001#newcode42 base/file_util_proxy.cc:42: int ErrorCode() { On 2010/08/24 17:43:14, darin wrote: > ...
10 years, 4 months ago (2010-08-24 19:14:57 UTC) #3
darin (slow to review)
10 years, 4 months ago (2010-08-25 04:58:50 UTC) #4
On Tue, Aug 24, 2010 at 12:14 PM, <dumi@chromium.org> wrote:

>
> http://codereview.chromium.org/3165050/diff/5001/6001
> File base/file_util_proxy.cc (right):
>
> http://codereview.chromium.org/3165050/diff/5001/6001#newcode42
> base/file_util_proxy.cc:42: int ErrorCode() {
> On 2010/08/24 17:43:14, darin wrote:
>
>> nit: consider naming these set_error_code() and error_code().  also,
>>
> the getter
>
>> should be 'const'
>>
>
> done. when do we use methods_like_this() and MethodsLikeThis()? i'm
> asking because all other functions are LikeThis().
>
>
simple getters and setters that are equivalent to direct member variable
access
are good to name using unix_hacker style.  that way it is clear at the
callsites
that the method is super cheap to call.  if you see a unix_hacker() method
within
the body of a for loop, you can know that there is no cost to the function.
 if you
are in the debugger and you encounter such a function, you know that there
is no
need to step into it, etc.  it's therefore a readability thing to use
unix_hacker() style.

it is also OK to use exclusively MixedCaps.  For example, you might not want
people to make assumptions about how fast your methods are to call (even if
today
they are implemented as simple member variable accesses).



>
> http://codereview.chromium.org/3165050/diff/5001/6003
> File base/platform_file.h (right):
>
> http://codereview.chromium.org/3165050/diff/5001/6003#newcode41
> base/platform_file.h:41: PLATFORM_FILE_TRUNCATE = 4096  // Used on
> Windows only
> On 2010/08/24 17:43:14, darin wrote:
>
>> don't we need to support truncation on other platforms?
>>
>
> this belongs to a different CL. removed.
>
>
Ah, OK

-Darin

>
> http://codereview.chromium.org/3165050/show
>

Powered by Google App Engine
This is Rietveld 408576698