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

Issue 306073004: Rename "CheckWritable" to "PrepareForWritableApp" to reflect the actual behavior. (Closed)

Created:
6 years, 6 months ago by kinaba
Modified:
6 years, 6 months ago
Reviewers:
benwells
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, yoshiki+watch_chromium.org, rginda+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, Sam McNally
Visibility:
Public.

Description

Rename "CheckWritable" to "PrepareForWritableApp" to reflect the actual behavior. The existing implementation in fact does not check whether the file is writable or not (see below for the detail.) Since the current behavior itself is fine for the use cases, this CL renames the relevant functions, and refactors the implementation so that the intent is clearer. Existing implementation tries to open a file with CREATE|READ|WRITE flags and verifies that the result is either FILE_OK or ALREADY_EXISTS. This _succeeds_ when read-only file already existed at the location because ALREADY_EXISTS error precedes write failure. Considering the fact, it is essentially equivalent to open with OPEN_ALWAYS|READ and comparing the result just against FILE_OK. BUG=367028 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274485

Patch Set 1 : #

Total comments: 4

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -19 lines) Patch
M apps/launcher.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/file_manager/filesystem_api_util.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/file_manager/filesystem_api_util.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/file_handlers/app_file_handler_util.h View 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc View 1 3 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.cc View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
kinaba
@benwells: Reflecting your comments in https://docs.google.com/a/chromium.org/document/d/17EC3gddwvREtEb1t4pqohbY53yp_5ekbWH7XEsM7Brc/edit I'd like to abandon the previous complex CL 295383010 ...
6 years, 6 months ago (2014-06-02 00:49:03 UTC) #1
benwells
lgtm with a couple of nits https://codereview.chromium.org/306073004/diff/20001/chrome/browser/chromeos/file_manager/filesystem_api_util.h File chrome/browser/chromeos/file_manager/filesystem_api_util.h (right): https://codereview.chromium.org/306073004/diff/20001/chrome/browser/chromeos/file_manager/filesystem_api_util.h#newcode43 chrome/browser/chromeos/file_manager/filesystem_api_util.h:43: // Ensures a ...
6 years, 6 months ago (2014-06-02 23:30:31 UTC) #2
kinaba
https://codereview.chromium.org/306073004/diff/20001/chrome/browser/chromeos/file_manager/filesystem_api_util.h File chrome/browser/chromeos/file_manager/filesystem_api_util.h (right): https://codereview.chromium.org/306073004/diff/20001/chrome/browser/chromeos/file_manager/filesystem_api_util.h#newcode43 chrome/browser/chromeos/file_manager/filesystem_api_util.h:43: // Ensures a file to exist at |path|, i.e., ...
6 years, 6 months ago (2014-06-03 02:29:54 UTC) #3
kinaba
The CQ bit was checked by kinaba@chromium.org
6 years, 6 months ago (2014-06-03 02:29:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinaba@chromium.org/306073004/40001
6 years, 6 months ago (2014-06-03 02:31:38 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_clang_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-03 06:19:44 UTC) #6
commit-bot: I haz the power
6 years, 6 months ago (2014-06-03 12:39:34 UTC) #7
Message was sent while issue was closed.
Change committed as 274485

Powered by Google App Engine
This is Rietveld 408576698