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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: . Created 5 years, 3 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 (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/libjingle_transport_factory.h" 5 #include "remoting/protocol/libjingle_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 Transport::ConnectedCallback callback_; 104 Transport::ConnectedCallback callback_;
105 std::string ice_username_fragment_; 105 std::string ice_username_fragment_;
106 106
107 bool can_start_; 107 bool can_start_;
108 108
109 std::string remote_ice_username_fragment_; 109 std::string remote_ice_username_fragment_;
110 std::string remote_ice_password_; 110 std::string remote_ice_password_;
111 std::list<cricket::Candidate> pending_candidates_; 111 std::list<cricket::Candidate> pending_candidates_;
112 scoped_ptr<cricket::P2PTransportChannel> channel_; 112 scoped_ptr<cricket::P2PTransportChannel> channel_;
113 int connect_attempts_left_; 113 int connect_attempts_left_;
114 base::RepeatingTimer<LibjingleTransport> reconnect_timer_; 114 base::RepeatingTimer reconnect_timer_;
115 115
116 base::WeakPtrFactory<LibjingleTransport> weak_factory_; 116 base::WeakPtrFactory<LibjingleTransport> weak_factory_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(LibjingleTransport); 118 DISALLOW_COPY_AND_ASSIGN(LibjingleTransport);
119 }; 119 };
120 120
121 LibjingleTransport::LibjingleTransport(cricket::PortAllocator* port_allocator, 121 LibjingleTransport::LibjingleTransport(cricket::PortAllocator* port_allocator,
122 const NetworkSettings& network_settings, 122 const NetworkSettings& network_settings,
123 TransportRole role) 123 TransportRole role)
124 : port_allocator_(port_allocator), 124 : port_allocator_(port_allocator),
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 last_jingle_info_update_time_ = base::TimeTicks::Now(); 446 last_jingle_info_update_time_ = base::TimeTicks::Now();
447 447
448 while (!on_jingle_info_callbacks_.empty()) { 448 while (!on_jingle_info_callbacks_.empty()) {
449 on_jingle_info_callbacks_.begin()->Run(); 449 on_jingle_info_callbacks_.begin()->Run();
450 on_jingle_info_callbacks_.pop_front(); 450 on_jingle_info_callbacks_.pop_front();
451 } 451 }
452 } 452 }
453 453
454 } // namespace protocol 454 } // namespace protocol
455 } // namespace remoting 455 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698