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

Issue 2533213005: Add File::Open / Create functions to take an rtc::Pathname (Closed)

Created:
4 years ago by Hzj_jie
Modified:
4 years ago
CC:
sprang_webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add File::Open / Create functions to take an rtc::Pathname When implementing ISOLATED_OUTDIR feature in WebRTC, I found two issues, 1. pathutils and flags are not accessible in testsupport. But both of them are useful for the feature. Pathname can help to combine path with filename, while a flag is needed to handle command line parameter. 2. rtc::File cannot accept an rtc::Pathname, which is a little bit inconvenient. After investigating bug webrtc:3806, flags, pathutils and urlencode are removed from rtc_base_approved because of the including of common.h. So I replaced common.h with checks.h, and ASSERT with RTC_DCHECK. flags, pathutils and urlencode pairs now can be placed into rtc_base_approved to unblock file.h to include pathutils.h. Please kindly let me know if you have other concerns about this change. BUG=webrtc:3806, webrtc:6732 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.chromium.mac:mac_chromium_rel_ng;master.tryserver.chromium.win:win_chromium_rel_ng;master.tryserver.chromium.android:linux_android_rel_ng Committed: https://crrev.com/dd87d580e8ffe546bd6e22cbd1522ffe76d675a7 Cr-Commit-Position: refs/heads/master@{#15451}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Resolve review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -76 lines) Patch
M webrtc/base/BUILD.gn View 6 chunks +6 lines, -6 lines 0 comments Download
M webrtc/base/file.h View 2 chunks +6 lines, -1 line 0 comments Download
M webrtc/base/file.cc View 2 chunks +33 lines, -0 lines 0 comments Download
M webrtc/base/file_unittest.cc View 1 chunk +26 lines, -0 lines 0 comments Download
M webrtc/base/fileutils.h View 1 3 chunks +4 lines, -5 lines 0 comments Download
M webrtc/base/flags.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/base/pathutils.h View 2 chunks +2 lines, -59 lines 0 comments Download
M webrtc/base/pathutils.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/base/urlencode.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 68 (57 generated)
Hzj_jie
4 years ago (2016-11-30 03:08:07 UTC) #48
palmkvist
lgtm with nit, but I'm adding a non-intern reviewer as well :) https://codereview.webrtc.org/2533213005/diff/100001/webrtc/base/urlencode.cc File webrtc/base/urlencode.cc ...
4 years ago (2016-12-01 13:31:13 UTC) #50
Hzj_jie
On 2016/12/01 13:31:13, palmkvist wrote: > lgtm with nit, but I'm adding a non-intern reviewer ...
4 years ago (2016-12-06 09:56:51 UTC) #51
stefan-webrtc
lgtm % nit https://codereview.webrtc.org/2533213005/diff/100001/webrtc/base/fileutils.h File webrtc/base/fileutils.h (right): https://codereview.webrtc.org/2533213005/diff/100001/webrtc/base/fileutils.h#newcode177 webrtc/base/fileutils.h:177: RTC_DCHECK(NULL != organization); organization != nullptr ...
4 years ago (2016-12-06 10:12:36 UTC) #52
Hzj_jie
https://codereview.webrtc.org/2533213005/diff/100001/webrtc/base/fileutils.h File webrtc/base/fileutils.h (right): https://codereview.webrtc.org/2533213005/diff/100001/webrtc/base/fileutils.h#newcode177 webrtc/base/fileutils.h:177: RTC_DCHECK(NULL != organization); On 2016/12/06 10:12:36, stefan-webrtc (holmer) wrote: ...
4 years ago (2016-12-06 22:33:07 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2533213005/120001
4 years ago (2016-12-06 23:02:32 UTC) #60
commit-bot: I haz the power
Committed patchset #2 (id:120001)
4 years ago (2016-12-06 23:04:07 UTC) #63
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/dd87d580e8ffe546bd6e22cbd1522ffe76d675a7 Cr-Commit-Position: refs/heads/master@{#15451}
4 years ago (2016-12-06 23:04:14 UTC) #65
nisse-webrtc
Hi, I'd just like to add that I'd like to delete all of base/pathutils.*, together ...
4 years ago (2016-12-08 08:57:38 UTC) #66
kjellander_webrtc
On 2016/12/08 08:57:38, nisse-webrtc wrote: > Hi, > > I'd just like to add that ...
4 years ago (2016-12-08 09:19:47 UTC) #67
Hzj_jie
4 years ago (2016-12-08 19:45:59 UTC) #68
Message was sent while issue was closed.
On 2016/12/08 09:19:47, kjellander_webrtc wrote:
> On 2016/12/08 08:57:38, nisse-webrtc wrote:
> > Hi,
> > 
> > I'd just like to add that I'd like to delete all of base/pathutils.*,
together
> > with base/fileutils.*.
> > 
> > I think it is a bit overengineered for webrtc, and besides test code, it is
> used
> > only in a few pieces
> > of deprecated code, try git grep base/pathutils.h.
> > 
> > Nice that the deprecated helpers in pathutils.h were deleted, but maybe a
bit
> > unfortunate to
> > promote pathutils.h to rtc_base_approved.
> >   
> > If some of the pathutils features are helpful for tests, it could be moved
to
> > some test target
> > rather than deleted completely.
> 
> I agree, these things could be moved to test_support instead. Providing
utility
> classes for handling files and paths isn't something we should expose as part
of
> our public API.

In change https://codereview.chromium.org/2558693002/, these classes (flags /
pathutils) are used by WriteIsolatedOutput() function. So feel free to move them
out of rtc_base_approved, and put them into testsupport, if you agree they
should not be public APIs exported by rtc.

Powered by Google App Engine
This is Rietveld 408576698