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

Side by Side Diff: remoting/jingle_glue/jingle_client.cc

Issue 5382008: Refactor ZLib and Verbatim encoders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 10 years 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/chromoting_host.cc ('k') | remoting/protocol/mock_objects.h » ('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 #include "remoting/jingle_glue/jingle_client.h" 5 #include "remoting/jingle_glue/jingle_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "jingle/notifier/communicator/gaia_token_pre_xmpp_auth.h" 9 #include "jingle/notifier/communicator/gaia_token_pre_xmpp_auth.h"
10 #include "remoting/jingle_glue/iq_request.h" 10 #include "remoting/jingle_glue/iq_request.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 break; 161 break;
162 case buzz::XmppEngine::STATE_OPENING: 162 case buzz::XmppEngine::STATE_OPENING:
163 UpdateState(CONNECTING); 163 UpdateState(CONNECTING);
164 break; 164 break;
165 case buzz::XmppEngine::STATE_OPEN: 165 case buzz::XmppEngine::STATE_OPEN:
166 SetFullJid(client_->jid().Str()); 166 SetFullJid(client_->jid().Str());
167 UpdateState(CONNECTED); 167 UpdateState(CONNECTED);
168 break; 168 break;
169 case buzz::XmppEngine::STATE_CLOSED: 169 case buzz::XmppEngine::STATE_CLOSED:
170 UpdateState(CLOSED); 170 UpdateState(CLOSED);
171 // Client is destroyed by the TaskRunner after the client is
172 // closed. Reset the pointer so we don't try to use it later.
173 client_ = NULL;
171 break; 174 break;
172 default: 175 default:
173 NOTREACHED(); 176 NOTREACHED();
174 break; 177 break;
175 } 178 }
176 } 179 }
177 180
178 void JingleClient::SetFullJid(const std::string& full_jid) { 181 void JingleClient::SetFullJid(const std::string& full_jid) {
179 AutoLock auto_lock(full_jid_lock_); 182 AutoLock auto_lock(full_jid_lock_);
180 full_jid_ = full_jid; 183 full_jid_ = full_jid;
(...skipping 13 matching lines...) Expand all
194 } 197 }
195 198
196 buzz::PreXmppAuth* JingleClient::CreatePreXmppAuth( 199 buzz::PreXmppAuth* JingleClient::CreatePreXmppAuth(
197 const buzz::XmppClientSettings& settings) { 200 const buzz::XmppClientSettings& settings) {
198 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY); 201 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
199 return new notifier::GaiaTokenPreXmppAuth(jid.Str(), settings.auth_cookie(), 202 return new notifier::GaiaTokenPreXmppAuth(jid.Str(), settings.auth_cookie(),
200 settings.token_service()); 203 settings.token_service());
201 } 204 }
202 205
203 } // namespace remoting 206 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/protocol/mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698