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

Side by Side Diff: ipc/ipc_channel_win.h

Issue 1322253003: ipc: Convert int types from basictypes.h to the ones from stdint.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 3 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_unittest.cc ('k') | ipc/ipc_channel_win.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 #ifndef IPC_IPC_CHANNEL_WIN_H_ 5 #ifndef IPC_IPC_CHANNEL_WIN_H_
6 #define IPC_IPC_CHANNEL_WIN_H_ 6 #define IPC_IPC_CHANNEL_WIN_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 #include <stdint.h>
11
10 #include <queue> 12 #include <queue>
11 #include <string> 13 #include <string>
12 14
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
15 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
16 #include "base/win/scoped_handle.h" 18 #include "base/win/scoped_handle.h"
17 #include "ipc/ipc_channel_reader.h" 19 #include "ipc/ipc_channel_reader.h"
18 20
19 namespace base { 21 namespace base {
(...skipping 29 matching lines...) Expand all
49 // ChannelReader implementation. 51 // ChannelReader implementation.
50 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; 52 ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override;
51 bool ShouldDispatchInputMessage(Message* msg) override; 53 bool ShouldDispatchInputMessage(Message* msg) override;
52 bool GetNonBrokeredAttachments(Message* msg) override; 54 bool GetNonBrokeredAttachments(Message* msg) override;
53 bool DidEmptyInputBuffers() override; 55 bool DidEmptyInputBuffers() override;
54 void HandleInternalMessage(const Message& msg) override; 56 void HandleInternalMessage(const Message& msg) override;
55 base::ProcessId GetSenderPID() override; 57 base::ProcessId GetSenderPID() override;
56 bool IsAttachmentBrokerEndpoint() override; 58 bool IsAttachmentBrokerEndpoint() override;
57 59
58 static const base::string16 PipeName(const std::string& channel_id, 60 static const base::string16 PipeName(const std::string& channel_id,
59 int32* secret); 61 int32_t* secret);
60 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); 62 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode);
61 63
62 bool ProcessConnection(); 64 bool ProcessConnection();
63 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context, 65 bool ProcessOutgoingMessages(base::MessageLoopForIO::IOContext* context,
64 DWORD bytes_written); 66 DWORD bytes_written);
65 67
66 // Returns |false| on channel error. 68 // Returns |false| on channel error.
67 // If |message| has brokerable attachments, those attachments are passed to 69 // If |message| has brokerable attachments, those attachments are passed to
68 // the AttachmentBroker (which in turn invokes Send()), so this method must 70 // the AttachmentBroker (which in turn invokes Send()), so this method must
69 // be re-entrant. 71 // be re-entrant.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 116
115 // This flag is set when processing incoming messages. It is used to 117 // This flag is set when processing incoming messages. It is used to
116 // avoid recursing through ProcessIncomingMessages, which could cause 118 // avoid recursing through ProcessIncomingMessages, which could cause
117 // problems. TODO(darin): make this unnecessary 119 // problems. TODO(darin): make this unnecessary
118 bool processing_incoming_; 120 bool processing_incoming_;
119 121
120 // Determines if we should validate a client's secret on connection. 122 // Determines if we should validate a client's secret on connection.
121 bool validate_client_; 123 bool validate_client_;
122 124
123 // Tracks the lifetime of this object, for debugging purposes. 125 // Tracks the lifetime of this object, for debugging purposes.
124 uint32 debug_flags_; 126 uint32_t debug_flags_;
125 127
126 // This is a unique per-channel value used to authenticate the client end of 128 // This is a unique per-channel value used to authenticate the client end of
127 // a connection. If the value is non-zero, the client passes it in the hello 129 // a connection. If the value is non-zero, the client passes it in the hello
128 // and the host validates. (We don't send the zero value fto preserve IPC 130 // and the host validates. (We don't send the zero value fto preserve IPC
129 // compatability with existing clients that don't validate the channel.) 131 // compatability with existing clients that don't validate the channel.)
130 int32 client_secret_; 132 int32_t client_secret_;
131 133
132 scoped_ptr<base::ThreadChecker> thread_check_; 134 scoped_ptr<base::ThreadChecker> thread_check_;
133 135
134 // |broker_| must outlive this instance. 136 // |broker_| must outlive this instance.
135 AttachmentBroker* broker_; 137 AttachmentBroker* broker_;
136 138
137 base::WeakPtrFactory<ChannelWin> weak_factory_; 139 base::WeakPtrFactory<ChannelWin> weak_factory_;
138 DISALLOW_COPY_AND_ASSIGN(ChannelWin); 140 DISALLOW_COPY_AND_ASSIGN(ChannelWin);
139 }; 141 };
140 142
141 } // namespace IPC 143 } // namespace IPC
142 144
143 #endif // IPC_IPC_CHANNEL_WIN_H_ 145 #endif // IPC_IPC_CHANNEL_WIN_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_unittest.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698