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

Side by Side Diff: ppapi/shared_impl/ppb_tcp_socket_shared.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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 | « ppapi/shared_impl/ppb_tcp_socket_shared.h ('k') | ppapi/shared_impl/ppb_trace_event_impl.h » ('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 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 "ppapi/shared_impl/ppb_tcp_socket_shared.h" 5 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace ppapi { 9 namespace ppapi {
10 10
11 TCPSocketState::TCPSocketState(StateType state) 11 TCPSocketState::TCPSocketState(StateType state)
12 : state_(state), 12 : state_(state), pending_transition_(NONE) {
13 pending_transition_(NONE) {
14 DCHECK(state_ == INITIAL || state_ == CONNECTED); 13 DCHECK(state_ == INITIAL || state_ == CONNECTED);
15 } 14 }
16 15
17 TCPSocketState::~TCPSocketState() { 16 TCPSocketState::~TCPSocketState() {}
18 }
19 17
20 void TCPSocketState::SetPendingTransition(TransitionType pending_transition) { 18 void TCPSocketState::SetPendingTransition(TransitionType pending_transition) {
21 DCHECK(IsValidTransition(pending_transition)); 19 DCHECK(IsValidTransition(pending_transition));
22 pending_transition_ = pending_transition; 20 pending_transition_ = pending_transition;
23 } 21 }
24 22
25 void TCPSocketState::CompletePendingTransition(bool success) { 23 void TCPSocketState::CompletePendingTransition(bool success) {
26 switch (pending_transition_) { 24 switch (pending_transition_) {
27 case NONE: 25 case NONE:
28 NOTREACHED(); 26 NOTREACHED();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 79
82 bool TCPSocketState::IsConnected() const { 80 bool TCPSocketState::IsConnected() const {
83 return state_ == CONNECTED || state_ == SSL_CONNECTED; 81 return state_ == CONNECTED || state_ == SSL_CONNECTED;
84 } 82 }
85 83
86 bool TCPSocketState::IsBound() const { 84 bool TCPSocketState::IsBound() const {
87 return state_ != INITIAL && state_ != CLOSED; 85 return state_ != INITIAL && state_ != CLOSED;
88 } 86 }
89 87
90 } // namespace ppapi 88 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_tcp_socket_shared.h ('k') | ppapi/shared_impl/ppb_trace_event_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698