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

Side by Side Diff: ipc/ipc_multiprocess_test.cc

Issue 196343019: IPC: Make ipc_perftests run on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_perftests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "ipc/ipc_channel.h"
7 #include "ipc/ipc_multiprocess_test.h" 8 #include "ipc/ipc_multiprocess_test.h"
8 9
9 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
10 #include "base/posix/global_descriptors.h" 11 #include "base/posix/global_descriptors.h"
11 #include "ipc/ipc_descriptors.h" 12 #include "ipc/ipc_descriptors.h"
12 #endif 13 #endif
13 14
14 namespace internal { 15 namespace internal {
15 16
16 void MultiProcessTestIPCSetUp() { 17 void MultiProcessTestIPCSetUp() {
18 #if defined(OS_ANDROID)
19 // On Android we can't 'exec'. So for simple multi-process tests
20 // we need to reset some global data after forking to get the same
21 // behavior in simple multi-process tests.
22 IPC::Channel::NotifyProcessForkedForTesting();
23 #endif
17 #if defined(OS_POSIX) 24 #if defined(OS_POSIX)
18 base::GlobalDescriptors::GetInstance()->Set(kPrimaryIPCChannel, 25 base::GlobalDescriptors::GetInstance()->Set(kPrimaryIPCChannel,
19 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor); 26 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
20 #endif 27 #endif
21 } 28 }
22 29
23 } // namespace internal 30 } // namespace internal
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_perftests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698