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

Side by Side Diff: jingle/notifier/communicator/login.h

Issue 3358028: Revert r59012 which started using Chrome sockets for sync. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
« no previous file with comments | « jingle/notifier/base/static_assert.h ('k') | jingle/notifier/communicator/login.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) 2010 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 JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_
6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class SingleLoginAttempt; 42 class SingleLoginAttempt;
43 43
44 // Does the login, keeps it alive (with refreshing cookies and reattempting 44 // Does the login, keeps it alive (with refreshing cookies and reattempting
45 // login when disconnected), figures out what actions to take on the various 45 // login when disconnected), figures out what actions to take on the various
46 // errors that may occur. 46 // errors that may occur.
47 class Login : public net::NetworkChangeNotifier::Observer, 47 class Login : public net::NetworkChangeNotifier::Observer,
48 public sigslot::has_slots<> { 48 public sigslot::has_slots<> {
49 public: 49 public:
50 // firewall may be NULL. 50 // firewall may be NULL.
51 Login(talk_base::TaskParent* parent, 51 Login(talk_base::TaskParent* parent,
52 bool use_chrome_async_socket,
52 const buzz::XmppClientSettings& user_settings, 53 const buzz::XmppClientSettings& user_settings,
53 const ConnectionOptions& options, 54 const ConnectionOptions& options,
54 std::string lang, 55 std::string lang,
55 net::HostResolver* host_resolver, 56 net::HostResolver* host_resolver,
56 ServerInformation* server_list, 57 ServerInformation* server_list,
57 int server_count, 58 int server_count,
58 talk_base::FirewallManager* firewall, 59 talk_base::FirewallManager* firewall,
59 bool try_ssltcp_first, 60 bool try_ssltcp_first,
60 bool proxy_only); 61 bool proxy_only);
61 virtual ~Login(); 62 virtual ~Login();
(...skipping 28 matching lines...) Expand all
90 91
91 // Tries to reconnect in some point in the future. If called 92 // Tries to reconnect in some point in the future. If called
92 // repeatedly, will wait longer and longer until reconnecting. 93 // repeatedly, will wait longer and longer until reconnecting.
93 void TryReconnect(); 94 void TryReconnect();
94 95
95 // The actual function (called by |reconnect_timer_|) that does the 96 // The actual function (called by |reconnect_timer_|) that does the
96 // reconnection. 97 // reconnection.
97 void DoReconnect(); 98 void DoReconnect();
98 99
99 talk_base::TaskParent* parent_; 100 talk_base::TaskParent* parent_;
101 bool use_chrome_async_socket_;
100 scoped_ptr<LoginSettings> login_settings_; 102 scoped_ptr<LoginSettings> login_settings_;
101 LoginConnectionState state_; 103 LoginConnectionState state_;
102 SingleLoginAttempt* single_attempt_; 104 SingleLoginAttempt* single_attempt_;
103 105
104 // reconnection state. 106 // reconnection state.
105 base::TimeDelta reconnect_interval_; 107 base::TimeDelta reconnect_interval_;
106 base::OneShotTimer<Login> reconnect_timer_; 108 base::OneShotTimer<Login> reconnect_timer_;
107 109
108 // server redirect information 110 // server redirect information
109 base::Time redirect_time_; 111 base::Time redirect_time_;
110 std::string redirect_server_; 112 std::string redirect_server_;
111 int redirect_port_; 113 int redirect_port_;
112 114
113 DISALLOW_COPY_AND_ASSIGN(Login); 115 DISALLOW_COPY_AND_ASSIGN(Login);
114 }; 116 };
115 117
116 } // namespace notifier 118 } // namespace notifier
117 119
118 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_ 120 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_H_
OLDNEW
« no previous file with comments | « jingle/notifier/base/static_assert.h ('k') | jingle/notifier/communicator/login.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698