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

Side by Side Diff: remoting/host/host_change_notification_listener.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/host/desktop_session_win.cc ('k') | remoting/host/host_window_proxy.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "remoting/host/host_change_notification_listener.h" 5 #include "remoting/host/host_change_notification_listener.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 11 matching lines...) Expand all
22 22
23 HostChangeNotificationListener::HostChangeNotificationListener( 23 HostChangeNotificationListener::HostChangeNotificationListener(
24 Listener* listener, 24 Listener* listener,
25 const std::string& host_id, 25 const std::string& host_id,
26 SignalStrategy* signal_strategy, 26 SignalStrategy* signal_strategy,
27 const std::string& directory_bot_jid) 27 const std::string& directory_bot_jid)
28 : listener_(listener), 28 : listener_(listener),
29 host_id_(host_id), 29 host_id_(host_id),
30 signal_strategy_(signal_strategy), 30 signal_strategy_(signal_strategy),
31 directory_bot_jid_(directory_bot_jid), 31 directory_bot_jid_(directory_bot_jid),
32 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 32 weak_factory_(this) {
33 DCHECK(signal_strategy_); 33 DCHECK(signal_strategy_);
34 34
35 signal_strategy_->AddListener(this); 35 signal_strategy_->AddListener(this);
36 } 36 }
37 37
38 HostChangeNotificationListener::~HostChangeNotificationListener() { 38 HostChangeNotificationListener::~HostChangeNotificationListener() {
39 signal_strategy_->RemoveListener(this); 39 signal_strategy_->RemoveListener(this);
40 } 40 }
41 41
42 void HostChangeNotificationListener::OnSignalStrategyStateChange( 42 void HostChangeNotificationListener::OnSignalStrategyStateChange(
(...skipping 30 matching lines...) Expand all
73 LOG(ERROR) << "Invalid host-changed message received: " << stanza->Str(); 73 LOG(ERROR) << "Invalid host-changed message received: " << stanza->Str();
74 } 74 }
75 return true; 75 return true;
76 } 76 }
77 77
78 void HostChangeNotificationListener::OnHostDeleted() { 78 void HostChangeNotificationListener::OnHostDeleted() {
79 listener_->OnHostDeleted(); 79 listener_->OnHostDeleted();
80 } 80 }
81 81
82 } // namespace remoting 82 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.cc ('k') | remoting/host/host_window_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698