| Index: mojo/edk/embedder/platform_channel_pair_posix.cc
|
| diff --git a/mojo/edk/embedder/platform_channel_pair_posix.cc b/mojo/edk/embedder/platform_channel_pair_posix.cc
|
| index 4760e9557240e2620120408f5c0996a2d949890a..55f3ae24ab1b297910bbbfb5536f6b0b8089a961 100644
|
| --- a/mojo/edk/embedder/platform_channel_pair_posix.cc
|
| +++ b/mojo/edk/embedder/platform_channel_pair_posix.cc
|
| @@ -35,15 +35,6 @@
|
|
|
| namespace {
|
|
|
| -#if defined(OS_ANDROID)
|
| -enum {
|
| - // Leave room for any other descriptors defined in content for example.
|
| - // TODO(jcivelli): consider changing base::GlobalDescriptors to generate a
|
| - // key when setting the file descriptor (http://crbug.com/676442).
|
| - kAndroidClientHandleDescriptor =
|
| - base::GlobalDescriptors::kBaseDescriptor + 10000,
|
| -};
|
| -#else
|
| bool IsTargetDescriptorUsed(
|
| const base::FileHandleMappingVector& file_handle_mapping,
|
| int target_fd) {
|
| @@ -53,7 +44,6 @@
|
| }
|
| return false;
|
| }
|
| -#endif
|
|
|
| } // namespace
|
|
|
| @@ -102,21 +92,13 @@
|
| PlatformChannelPair::PassClientHandleFromParentProcessFromString(
|
| const std::string& value) {
|
| int client_fd = -1;
|
| -#if defined(OS_ANDROID)
|
| - base::GlobalDescriptors::Key key = -1;
|
| - if (value.empty() || !base::StringToUint(value, &key)) {
|
| - LOG(ERROR) << "Missing or invalid --" << kMojoPlatformChannelHandleSwitch;
|
| - return ScopedPlatformHandle();
|
| - }
|
| - client_fd = base::GlobalDescriptors::GetInstance()->Get(key);
|
| -#else
|
| if (value.empty() ||
|
| !base::StringToInt(value, &client_fd) ||
|
| client_fd < base::GlobalDescriptors::kBaseDescriptor) {
|
| LOG(ERROR) << "Missing or invalid --" << kMojoPlatformChannelHandleSwitch;
|
| return ScopedPlatformHandle();
|
| }
|
| -#endif
|
| +
|
| return ScopedPlatformHandle(PlatformHandle(client_fd));
|
| }
|
|
|
| @@ -142,12 +124,6 @@
|
| std::string
|
| PlatformChannelPair::PrepareToPassClientHandleToChildProcessAsString(
|
| HandlePassingInformation* handle_passing_info) const {
|
| -#if defined(OS_ANDROID)
|
| - int fd = client_handle_.get().handle;
|
| - handle_passing_info->push_back(
|
| - std::pair<int, int>(fd, kAndroidClientHandleDescriptor));
|
| - return base::UintToString(kAndroidClientHandleDescriptor);
|
| -#else
|
| DCHECK(handle_passing_info);
|
| // This is an arbitrary sanity check. (Note that this guarantees that the loop
|
| // below will terminate sanely.)
|
| @@ -165,7 +141,6 @@
|
| handle_passing_info->push_back(
|
| std::pair<int, int>(client_handle_.get().handle, target_fd));
|
| return base::IntToString(target_fd);
|
| -#endif
|
| }
|
|
|
| } // namespace edk
|
|
|