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

Side by Side Diff: google_apis/gcm/engine/connection_handler_impl.h

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_
6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // handshake (version and/or LoginResponse) or once at least a tag packet has 93 // handshake (version and/or LoginResponse) or once at least a tag packet has
94 // been received. It is reset every time new data is received, and is 94 // been received. It is reset every time new data is received, and is
95 // only stopped when a full message is processed. 95 // only stopped when a full message is processed.
96 // TODO(zea): consider enforcing a separate timeout when waiting for 96 // TODO(zea): consider enforcing a separate timeout when waiting for
97 // a message to send. 97 // a message to send.
98 const base::TimeDelta read_timeout_; 98 const base::TimeDelta read_timeout_;
99 base::OneShotTimer read_timeout_timer_; 99 base::OneShotTimer read_timeout_timer_;
100 100
101 // This connection's socket and the input/output streams attached to it. 101 // This connection's socket and the input/output streams attached to it.
102 net::StreamSocket* socket_; 102 net::StreamSocket* socket_;
103 scoped_ptr<SocketInputStream> input_stream_; 103 std::unique_ptr<SocketInputStream> input_stream_;
104 scoped_ptr<SocketOutputStream> output_stream_; 104 std::unique_ptr<SocketOutputStream> output_stream_;
105 105
106 // Whether the MCS login handshake has successfully completed. See Init(..) 106 // Whether the MCS login handshake has successfully completed. See Init(..)
107 // description for more info on what the handshake involves. 107 // description for more info on what the handshake involves.
108 bool handshake_complete_; 108 bool handshake_complete_;
109 109
110 // State for the message currently being processed, if there is one. 110 // State for the message currently being processed, if there is one.
111 uint8_t message_tag_; 111 uint8_t message_tag_;
112 uint32_t message_size_; 112 uint32_t message_size_;
113 113
114 ProtoReceivedCallback read_callback_; 114 ProtoReceivedCallback read_callback_;
(...skipping 10 matching lines...) Expand all
125 std::vector<uint8_t> payload_input_buffer_; 125 std::vector<uint8_t> payload_input_buffer_;
126 126
127 base::WeakPtrFactory<ConnectionHandlerImpl> weak_ptr_factory_; 127 base::WeakPtrFactory<ConnectionHandlerImpl> weak_ptr_factory_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl); 129 DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl);
130 }; 130 };
131 131
132 } // namespace gcm 132 } // namespace gcm
133 133
134 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_ 134 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698