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

Side by Side Diff: chrome/common/net/notifier/communicator/login.h

Issue 2802015: Massively simplify the NetworkChangeNotifier infrastructure:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_ 5 #ifndef CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_
6 #define CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_ 6 #define CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/timer.h" 11 #include "base/timer.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public sigslot::has_slots<> { 49 public sigslot::has_slots<> {
50 public: 50 public:
51 // network_status and firewall may be NULL. 51 // network_status and firewall may be NULL.
52 Login(talk_base::TaskParent* parent, 52 Login(talk_base::TaskParent* parent,
53 const buzz::XmppClientSettings& user_settings, 53 const buzz::XmppClientSettings& user_settings,
54 const ConnectionOptions& options, 54 const ConnectionOptions& options,
55 std::string lang, 55 std::string lang,
56 net::HostResolver* host_resolver, 56 net::HostResolver* host_resolver,
57 ServerInformation* server_list, 57 ServerInformation* server_list,
58 int server_count, 58 int server_count,
59 net::NetworkChangeNotifier* network_change_notifier,
60 talk_base::FirewallManager* firewall, 59 talk_base::FirewallManager* firewall,
61 bool proxy_only, 60 bool proxy_only,
62 bool previous_login_successful); 61 bool previous_login_successful);
63 virtual ~Login(); 62 virtual ~Login();
64 63
65 LoginConnectionState connection_state() const { 64 LoginConnectionState connection_state() const {
66 return state_; 65 return state_;
67 } 66 }
68 67
69 void StartConnection(); 68 void StartConnection();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void OnLogoff(); 118 void OnLogoff();
120 void OnAutoReconnectTimerChange(); 119 void OnAutoReconnectTimerChange();
121 120
122 void HandleClientStateChange(LoginConnectionState new_state); 121 void HandleClientStateChange(LoginConnectionState new_state);
123 void ResetUnexpectedDisconnect(); 122 void ResetUnexpectedDisconnect();
124 123
125 void OnDisconnectTimeout(); 124 void OnDisconnectTimeout();
126 125
127 talk_base::TaskParent* parent_; 126 talk_base::TaskParent* parent_;
128 scoped_ptr<LoginSettings> login_settings_; 127 scoped_ptr<LoginSettings> login_settings_;
129 net::NetworkChangeNotifier* network_change_notifier_;
130 AutoReconnect auto_reconnect_; 128 AutoReconnect auto_reconnect_;
131 SingleLoginAttempt* single_attempt_; 129 SingleLoginAttempt* single_attempt_;
132 bool successful_connection_; 130 bool successful_connection_;
133 131
134 LoginConnectionState state_; 132 LoginConnectionState state_;
135 133
136 // server redirect information 134 // server redirect information
137 base::Time redirect_time_; 135 base::Time redirect_time_;
138 std::string redirect_server_; 136 std::string redirect_server_;
139 int redirect_port_; 137 int redirect_port_;
140 bool unexpected_disconnect_occurred_; 138 bool unexpected_disconnect_occurred_;
141 base::OneShotTimer<Login> reset_unexpected_timer_; 139 base::OneShotTimer<Login> reset_unexpected_timer_;
142 std::string google_host_; 140 std::string google_host_;
143 std::string google_user_; 141 std::string google_user_;
144 talk_base::ProxyInfo proxy_info_; 142 talk_base::ProxyInfo proxy_info_;
145 143
146 base::OneShotTimer<Login> disconnect_timer_; 144 base::OneShotTimer<Login> disconnect_timer_;
147 145
148 DISALLOW_COPY_AND_ASSIGN(Login); 146 DISALLOW_COPY_AND_ASSIGN(Login);
149 }; 147 };
150 148
151 } // namespace notifier 149 } // namespace notifier
152 150
153 #endif // CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_ 151 #endif // CHROME_COMMON_NET_NOTIFIER_COMMUNICATOR_LOGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698