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

Issue 555503007: Cleanup: Get rid of OS_WIN/OS_POSIX ifdefs from MojoApplication (Closed)

Created:
6 years, 3 months ago by Hajime Morrita
Modified:
6 years, 3 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), erikwright+watch_chromium.org, ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Cleanup: Get rid of OS_WIN/OS_POSIX ifdefs from MojoApplication This CL gets rid of some OS_WIN/OS_POSIX ifdefs by using base::PlatformFile type. It also simplifies ChannelMojo as well. R=darin@chromium.org, viettrunluu@chromium.org TBR=thakis@chomium.org TEST=none BUG=none

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed comments #

Total comments: 1

Patch Set 3 : #

Total comments: 4

Patch Set 4 : Updated #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -38 lines) Patch
M base/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M base/files/file.h View 1 2 chunks +3 lines, -6 lines 0 comments Download
A base/files/platform_file.h View 1 2 3 1 chunk +30 lines, -0 lines 1 comment Download
M content/browser/mojo/mojo_application_host.cc View 1 2 3 3 chunks +2 lines, -15 lines 0 comments Download
M content/child/mojo/mojo_application.cc View 1 chunk +1 line, -5 lines 0 comments Download
M ipc/ipc_channel_handle.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.cc View 1 2 3 2 chunks +2 lines, -12 lines 0 comments Download
M mojo/embedder/platform_handle.h View 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
Hajime Morrita
6 years, 3 months ago (2014-09-11 20:42:44 UTC) #1
Hajime Morrita
PTAL? This small cleanup is a preparation of my ChannelMojo for windows work https://codereview.chromium.org/553283002/
6 years, 3 months ago (2014-09-11 20:44:00 UTC) #3
viettrungluu
https://codereview.chromium.org/555503007/diff/1/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/555503007/diff/1/base/files/file.h#newcode34 base/files/file.h:34: #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) This stuff was ...
6 years, 3 months ago (2014-09-12 00:12:45 UTC) #4
Hajime Morrita
Thanks for the review! PTAL? https://codereview.chromium.org/555503007/diff/1/base/files/file.h File base/files/file.h (right): https://codereview.chromium.org/555503007/diff/1/base/files/file.h#newcode34 base/files/file.h:34: #if defined(OS_BSD) || defined(OS_MACOSX) ...
6 years, 3 months ago (2014-09-12 00:39:01 UTC) #5
viettrungluu
lgtm w/nit, but I'm not an owner of most of these directories https://codereview.chromium.org/555503007/diff/20001/ipc/ipc_channel_handle.h File ipc/ipc_channel_handle.h ...
6 years, 3 months ago (2014-09-12 16:39:07 UTC) #6
Hajime Morrita
Thanks for the review Trung! I updated the CL. Darin, could you rubberstamp this? This ...
6 years, 3 months ago (2014-09-12 19:45:31 UTC) #7
Hajime Morrita
John: Could you take at ipc/ and content/ ? change on content/ just follows the ...
6 years, 3 months ago (2014-09-15 17:35:14 UTC) #10
jam
lgtm
6 years, 3 months ago (2014-09-15 22:40:12 UTC) #11
Hajime Morrita
Nico: Could you rubberstamp base/ change? It just extracts platform_file.h.
6 years, 3 months ago (2014-09-15 23:54:29 UTC) #13
Hajime Morrita
I learned that this type of change is OK to use TBR.
6 years, 3 months ago (2014-09-16 01:52:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/555503007/40001
6 years, 3 months ago (2014-09-16 02:19:17 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/10381) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/10665)
6 years, 3 months ago (2014-09-16 02:41:50 UTC) #18
brettw
File additions to base definitely aren't OK to TBR
6 years, 3 months ago (2014-09-16 16:49:19 UTC) #20
Hajime Morrita
On 2014/09/16 16:49:19, brettw wrote: > File additions to base definitely aren't OK to TBR ...
6 years, 3 months ago (2014-09-16 16:57:21 UTC) #21
brettw
Ricardo did most of the base file moving around. I'd want to check that he's ...
6 years, 3 months ago (2014-09-16 17:22:03 UTC) #23
Hajime Morrita
Thanks for the review! I'll wait for Ricardo's comment. https://codereview.chromium.org/555503007/diff/40001/base/files/platform_file.h File base/files/platform_file.h (right): https://codereview.chromium.org/555503007/diff/40001/base/files/platform_file.h#newcode8 base/files/platform_file.h:8: ...
6 years, 3 months ago (2014-09-16 17:50:24 UTC) #24
rvargas (doing something else)
https://codereview.chromium.org/555503007/diff/60001/base/files/platform_file.h File base/files/platform_file.h (right): https://codereview.chromium.org/555503007/diff/60001/base/files/platform_file.h#newcode19 base/files/platform_file.h:19: const PlatformFile kInvalidPlatformFile = INVALID_HANDLE_VALUE; I'm not really happy ...
6 years, 3 months ago (2014-09-17 04:51:46 UTC) #25
Hajime Morrita
6 years, 3 months ago (2014-09-17 17:02:16 UTC) #26
Hi Ricard, thanks for the review and shharing your thought!

On 2014/09/17 04:51:46, rvargas wrote:
>
https://codereview.chromium.org/555503007/diff/60001/base/files/platform_file.h
> File base/files/platform_file.h (right):
> 
>
https://codereview.chromium.org/555503007/diff/60001/base/files/platform_file...
> base/files/platform_file.h:19: const PlatformFile kInvalidPlatformFile =
> INVALID_HANDLE_VALUE;
> I'm not really happy reviving PlatformFile and kInvalidPlatformFile as first
> class citizens of base.
> 
> The main reason behind moving PlatformFile behind base::File was to make it
> extremely obvious that File is what should be used in almost all cases and
> HANDLE/fd should be avoided... to the point that code that really wants to use
> raw handles has to redefine kInvalidPlatformFile (because really, there should
> be an object somewhere with an IsValid method to check)
> 

This makes sense.

> In fact I was planning removing PlatformFile from the definition of
> PlatforFileForTransit and make users pass a const File& when they want to
share
> a file with another process. The only reason I haven't is that IPC is being
> replaced by mojo ipc.

An irony here is that this patch is a part of Mojo-IPC work...
As Mojo-in-Chrome uses IPC::Channel for bootstrapping its pipe,
we won't be able t o kill it anytime soon.

Probably I should kill PlatformFile in PlatformFileInTransit as you mentioned.
Let me try.

Powered by Google App Engine
This is Rietveld 408576698