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

Side by Side Diff: mojo/edk/system/channel.h

Issue 2749853003: Making the Mojo Channel Messages legacy mode dynamic. (Closed)
Patch Set: Fixed NaCl browser test failures. Created 3 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 | « mojo/edk/embedder/embedder.cc ('k') | mojo/edk/system/channel.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MOJO_EDK_SYSTEM_CHANNEL_H_ 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_H_
6 #define MOJO_EDK_SYSTEM_CHANNEL_H_ 6 #define MOJO_EDK_SYSTEM_CHANNEL_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Prepares the handles in this message for use in a different process. 164 // Prepares the handles in this message for use in a different process.
165 // Upon calling this the handles should belong to |from_process|; after the 165 // Upon calling this the handles should belong to |from_process|; after the
166 // call they'll belong to |to_process|. The source handles are always 166 // call they'll belong to |to_process|. The source handles are always
167 // closed by this call. Returns false iff one or more handles failed 167 // closed by this call. Returns false iff one or more handles failed
168 // duplication. 168 // duplication.
169 static bool RewriteHandles(base::ProcessHandle from_process, 169 static bool RewriteHandles(base::ProcessHandle from_process,
170 base::ProcessHandle to_process, 170 base::ProcessHandle to_process,
171 PlatformHandleVector* handles); 171 PlatformHandleVector* handles);
172 #endif 172 #endif
173 173
174 void SetVersionForTest(uint16_t version_number); 174 static void SetUseLegacyTransportProtocol(bool use_legacy_protocol);
175 175
176 private: 176 private:
177 size_t size_ = 0; 177 size_t size_ = 0;
178 size_t max_handles_ = 0; 178 size_t max_handles_ = 0;
179 char* data_ = nullptr; 179 char* data_ = nullptr;
180 180
181 ScopedPlatformHandleVectorPtr handle_vector_; 181 ScopedPlatformHandleVectorPtr handle_vector_;
182 182
183 #if defined(OS_WIN) 183 #if defined(OS_WIN)
184 // On Windows, handles are serialised into the extra header section. 184 // On Windows, handles are serialised into the extra header section.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 Delegate* delegate_; 294 Delegate* delegate_;
295 const std::unique_ptr<ReadBuffer> read_buffer_; 295 const std::unique_ptr<ReadBuffer> read_buffer_;
296 296
297 DISALLOW_COPY_AND_ASSIGN(Channel); 297 DISALLOW_COPY_AND_ASSIGN(Channel);
298 }; 298 };
299 299
300 } // namespace edk 300 } // namespace edk
301 } // namespace mojo 301 } // namespace mojo
302 302
303 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_ 303 #endif // MOJO_EDK_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder.cc ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698