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

Side by Side Diff: remoting/protocol/channel_multiplexer.cc

Issue 14522010: remoting: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/fake_signal_strategy.cc ('k') | remoting/protocol/fake_authenticator.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 #include "remoting/protocol/channel_multiplexer.h" 5 #include "remoting/protocol/channel_multiplexer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 std::swap(cb, read_callback_); 351 std::swap(cb, read_callback_);
352 cb.Run(result); 352 cb.Run(result);
353 } 353 }
354 } 354 }
355 355
356 ChannelMultiplexer::ChannelMultiplexer(ChannelFactory* factory, 356 ChannelMultiplexer::ChannelMultiplexer(ChannelFactory* factory,
357 const std::string& base_channel_name) 357 const std::string& base_channel_name)
358 : base_channel_factory_(factory), 358 : base_channel_factory_(factory),
359 base_channel_name_(base_channel_name), 359 base_channel_name_(base_channel_name),
360 next_channel_id_(0), 360 next_channel_id_(0),
361 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 361 weak_factory_(this) {
362 } 362 }
363 363
364 ChannelMultiplexer::~ChannelMultiplexer() { 364 ChannelMultiplexer::~ChannelMultiplexer() {
365 DCHECK(pending_channels_.empty()); 365 DCHECK(pending_channels_.empty());
366 STLDeleteValues(&channels_); 366 STLDeleteValues(&channels_);
367 367
368 // Cancel creation of the base channel if it hasn't finished. 368 // Cancel creation of the base channel if it hasn't finished.
369 if (base_channel_factory_) 369 if (base_channel_factory_)
370 base_channel_factory_->CancelChannelCreation(base_channel_name_); 370 base_channel_factory_->CancelChannelCreation(base_channel_name_);
371 } 371 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 channel->OnIncomingPacket(packet.Pass(), done_task); 510 channel->OnIncomingPacket(packet.Pass(), done_task);
511 } 511 }
512 512
513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, 513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet,
514 const base::Closure& done_task) { 514 const base::Closure& done_task) {
515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); 515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task);
516 } 516 }
517 517
518 } // namespace protocol 518 } // namespace protocol
519 } // namespace remoting 519 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/fake_signal_strategy.cc ('k') | remoting/protocol/fake_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698