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

Side by Side Diff: ipc/ipc_sync_channel_unittest.cc

Issue 218133002: Add unistd.h include in a file using geteuid(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « base/process/process_iterator_mac.cc ('k') | sql/sqlite_features_unittest.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 "ipc/ipc_sync_channel.h" 5 #include "ipc/ipc_sync_channel.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 events_[1]->Wait(); 1510 events_[1]->Wait();
1511 DCHECK(received_msg_ == false); 1511 DCHECK(received_msg_ == false);
1512 1512
1513 Message* message = new SyncChannelTestMsg_NoArgs; 1513 Message* message = new SyncChannelTestMsg_NoArgs;
1514 message->set_unblock(true); 1514 message->set_unblock(true);
1515 Send(message); 1515 Send(message);
1516 received_noarg_reply_ = true; 1516 received_noarg_reply_ = true;
1517 PossiblyDone(); 1517 PossiblyDone();
1518 } 1518 }
1519 1519
1520 base::Thread* ListenerThread() { return Worker::ListenerThread(); }
1521 private: 1520 private:
1522 virtual bool OnMessageReceived(const Message& message) OVERRIDE { 1521 virtual bool OnMessageReceived(const Message& message) OVERRIDE {
1523 IPC_BEGIN_MESSAGE_MAP(RestrictedDispatchDeadlockClient1, message) 1522 IPC_BEGIN_MESSAGE_MAP(RestrictedDispatchDeadlockClient1, message)
1524 IPC_MESSAGE_HANDLER(SyncChannelTestMsg_NoArgs, OnNoArgs) 1523 IPC_MESSAGE_HANDLER(SyncChannelTestMsg_NoArgs, OnNoArgs)
1525 IPC_END_MESSAGE_MAP() 1524 IPC_END_MESSAGE_MAP()
1526 return true; 1525 return true;
1527 } 1526 }
1528 1527
1529 void OnNoArgs() { 1528 void OnNoArgs() {
1530 received_msg_ = true; 1529 received_msg_ = true;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 } 1894 }
1896 1895
1897 // Windows needs to send an out-of-band secret to verify the client end of the 1896 // Windows needs to send an out-of-band secret to verify the client end of the
1898 // channel. Test that we still connect correctly in that case. 1897 // channel. Test that we still connect correctly in that case.
1899 TEST_F(IPCSyncChannelTest, Verified) { 1898 TEST_F(IPCSyncChannelTest, Verified) {
1900 Verified(); 1899 Verified();
1901 } 1900 }
1902 1901
1903 } // namespace 1902 } // namespace
1904 } // namespace IPC 1903 } // namespace IPC
OLDNEW
« no previous file with comments | « base/process/process_iterator_mac.cc ('k') | sql/sqlite_features_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698