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

Issue 5340004: Make ScopedTempDir::Delete return a bool so that its functionality can be te... (Closed)

Created:
10 years ago by tommi (sloooow) - chröme
Modified:
9 years, 7 months ago
Reviewers:
Paweł Hajdan Jr.
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr., robertshield
Visibility:
Public.

Description

Make ScopedTempDir::Delete return a bool so that its functionality can be tested. TEST=Run the new unit test: ScopedTempDir.LockedTempDir BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67551

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 8

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -6 lines) Patch
M base/scoped_temp_dir.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M base/scoped_temp_dir.cc View 1 2 3 4 2 chunks +14 lines, -4 lines 0 comments Download
M base/scoped_temp_dir_unittest.cc View 1 2 3 4 5 3 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
tommi (sloooow) - chröme
10 years ago (2010-11-26 20:40:16 UTC) #1
tommi (sloooow) - chröme
it's -> its On Fri, Nov 26, 2010 at 3:40 PM, <tommi@chromium.org> wrote: > Reviewers: ...
10 years ago (2010-11-26 20:41:19 UTC) #2
Paweł Hajdan Jr.
http://codereview.chromium.org/5340004/diff/1/base/scoped_temp_dir.cc File base/scoped_temp_dir.cc (right): http://codereview.chromium.org/5340004/diff/1/base/scoped_temp_dir.cc#newcode62 base/scoped_temp_dir.cc:62: if (!path_.empty()) { nit: Rather: if (path.empty()) return false; ...
10 years ago (2010-11-26 21:01:20 UTC) #3
tommi (sloooow) - chröme
http://codereview.chromium.org/5340004/diff/1/base/scoped_temp_dir.cc File base/scoped_temp_dir.cc (right): http://codereview.chromium.org/5340004/diff/1/base/scoped_temp_dir.cc#newcode62 base/scoped_temp_dir.cc:62: if (!path_.empty()) { On 2010/11/26 21:01:20, Paweł Hajdan Jr. ...
10 years ago (2010-11-26 21:04:44 UTC) #4
tommi (sloooow) - chröme
FYI - I made the test Windows only.
10 years ago (2010-11-27 00:02:08 UTC) #5
Paweł Hajdan Jr.
http://codereview.chromium.org/5340004/diff/12001/base/scoped_temp_dir.h File base/scoped_temp_dir.h (right): http://codereview.chromium.org/5340004/diff/12001/base/scoped_temp_dir.h#newcode41 base/scoped_temp_dir.h:41: // Returns true if the directory was successfully deleted. ...
10 years ago (2010-11-27 14:57:07 UTC) #6
tommi (sloooow) - chröme
http://codereview.chromium.org/5340004/diff/12001/base/scoped_temp_dir.h File base/scoped_temp_dir.h (right): http://codereview.chromium.org/5340004/diff/12001/base/scoped_temp_dir.h#newcode41 base/scoped_temp_dir.h:41: // Returns true if the directory was successfully deleted. ...
10 years ago (2010-11-28 02:37:03 UTC) #7
Paweł Hajdan Jr.
LGTM with a nit. http://codereview.chromium.org/5340004/diff/9004/base/scoped_temp_dir.h File base/scoped_temp_dir.h (right): http://codereview.chromium.org/5340004/diff/9004/base/scoped_temp_dir.h#newcode41 base/scoped_temp_dir.h:41: bool Delete(); nit: Add WARN_UNUSED_RESULT ...
10 years ago (2010-11-29 09:32:17 UTC) #8
tommi (sloooow) - chröme
http://codereview.chromium.org/5340004/diff/9004/base/scoped_temp_dir.h File base/scoped_temp_dir.h (right): http://codereview.chromium.org/5340004/diff/9004/base/scoped_temp_dir.h#newcode41 base/scoped_temp_dir.h:41: bool Delete(); On 2010/11/29 09:32:17, Paweł Hajdan Jr. wrote: ...
10 years ago (2010-11-29 14:50:16 UTC) #9
tommi (sloooow) - chröme
Hey Pawel - I'm going to revert the WARN_UNUSED_RESULT change since it will break the ...
10 years ago (2010-11-29 15:05:15 UTC) #10
Paweł Hajdan Jr.
Yes I'd like to have it - wasn't that the point of the change? Thanks! ...
10 years ago (2010-11-30 09:29:32 UTC) #11
tommi (sloooow) - chröme
10 years ago (2010-11-30 15:26:40 UTC) #12
Nope, that wasn't the point.  The point was to allow tests to check the
return value of Delete when that is a part of the test.
The class and the Delete function are currently used outside of such tests
and checking the return value there isn't critical.

I'll prepare a patch and send you the review.

On Tue, Nov 30, 2010 at 4:29 AM, Paweł Hajdan, Jr.
<phajdan.jr@chromium.org>wrote:

> Yes I'd like to have it - wasn't that the point of the change? Thanks!
>
>
> On Mon, Nov 29, 2010 at 16:05, <tommi@chromium.org> wrote:
>
>> Hey Pawel - I'm going to revert the WARN_UNUSED_RESULT change since it
>> will
>> break the linux build.  I don't think it's necessary in all cases to check
>> the
>> return value.  Only for tests that require it as part of the test itself.
>> Let me know if you still prefer to have that in and I'll prepare a second
>> change
>> that does it.
>>
>>
>> http://codereview.chromium.org/5340004/
>>
>
>

Powered by Google App Engine
This is Rietveld 408576698