| OLD | NEW |
| 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 "jingle/notifier/base/weak_xmpp_client.h" | 5 #include "jingle/notifier/base/weak_xmpp_client.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 namespace notifier { | 9 namespace notifier { |
| 10 | 10 |
| 11 WeakXmppClient::WeakXmppClient(talk_base::TaskParent* parent) | 11 WeakXmppClient::WeakXmppClient(rtc::TaskParent* parent) |
| 12 : buzz::XmppClient(parent), | 12 : buzz::XmppClient(parent), |
| 13 weak_ptr_factory_(this) {} | 13 weak_ptr_factory_(this) {} |
| 14 | 14 |
| 15 WeakXmppClient::~WeakXmppClient() { | 15 WeakXmppClient::~WeakXmppClient() { |
| 16 DCHECK(CalledOnValidThread()); | 16 DCHECK(CalledOnValidThread()); |
| 17 Invalidate(); | 17 Invalidate(); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void WeakXmppClient::Invalidate() { | 20 void WeakXmppClient::Invalidate() { |
| 21 DCHECK(CalledOnValidThread()); | 21 DCHECK(CalledOnValidThread()); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 void WeakXmppClient::Stop() { | 34 void WeakXmppClient::Stop() { |
| 35 DCHECK(CalledOnValidThread()); | 35 DCHECK(CalledOnValidThread()); |
| 36 // We don't want XmppClient used after it has been stopped. | 36 // We don't want XmppClient used after it has been stopped. |
| 37 Invalidate(); | 37 Invalidate(); |
| 38 buzz::XmppClient::Stop(); | 38 buzz::XmppClient::Stop(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace notifier | 41 } // namespace notifier |
| OLD | NEW |