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

Side by Side Diff: mojo/system/channel.cc

Issue 603983003: Mojo: COMPILE_ASSERT -> static_assert in mojo/system and mojo/embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/system/channel.h" 5 #include "mojo/system/channel.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "mojo/embedder/platform_handle_vector.h" 14 #include "mojo/embedder/platform_handle_vector.h"
15 #include "mojo/system/message_pipe_endpoint.h" 15 #include "mojo/system/message_pipe_endpoint.h"
16 #include "mojo/system/transport_data.h" 16 #include "mojo/system/transport_data.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace system { 19 namespace system {
20 20
21 COMPILE_ASSERT(Channel::kBootstrapEndpointId != 21 static_assert(Channel::kBootstrapEndpointId !=
22 MessageInTransit::kInvalidEndpointId, 22 MessageInTransit::kInvalidEndpointId,
23 kBootstrapEndpointId_is_invalid); 23 "kBootstrapEndpointId is invalid");
24 24
25 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId 25 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId
26 Channel::kBootstrapEndpointId; 26 Channel::kBootstrapEndpointId;
27 27
28 Channel::Channel(embedder::PlatformSupport* platform_support) 28 Channel::Channel(embedder::PlatformSupport* platform_support)
29 : platform_support_(platform_support), 29 : platform_support_(platform_support),
30 is_running_(false), 30 is_running_(false),
31 is_shutting_down_(false), 31 is_shutting_down_(false),
32 next_local_id_(kBootstrapEndpointId) { 32 next_local_id_(kBootstrapEndpointId) {
33 } 33 }
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // TODO(vtl): Is this how we really want to handle this? 526 // TODO(vtl): Is this how we really want to handle this?
527 // Sometimes we'll want to propagate the error back to the message pipe 527 // Sometimes we'll want to propagate the error back to the message pipe
528 // (endpoint), and notify it that the remote is (effectively) closed. 528 // (endpoint), and notify it that the remote is (effectively) closed.
529 // Sometimes we'll want to kill the channel (and notify all the endpoints that 529 // Sometimes we'll want to kill the channel (and notify all the endpoints that
530 // their remotes are dead. 530 // their remotes are dead.
531 LOG(WARNING) << error_message; 531 LOG(WARNING) << error_message;
532 } 532 }
533 533
534 } // namespace system 534 } // namespace system
535 } // namespace mojo 535 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/embedder/simple_platform_shared_buffer_posix.cc ('k') | mojo/system/handle_signals_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698