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

Side by Side Diff: jingle/notifier/communicator/single_login_attempt.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 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 <string> 5 #include <string>
6 6
7 #include "jingle/notifier/communicator/single_login_attempt.h" 7 #include "jingle/notifier/communicator/single_login_attempt.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 redirect_server.set_port(port); 79 redirect_server.set_port(port);
80 return redirect_server; 80 return redirect_server;
81 } 81 }
82 82
83 } // namespace 83 } // namespace
84 84
85 void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode, 85 void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode,
86 const buzz::XmlElement* stream_error) { 86 const buzz::XmlElement* stream_error) {
87 DVLOG(1) << "Error: " << error << ", subcode: " << subcode 87 DVLOG(1) << "Error: " << error << ", subcode: " << subcode
88 << (stream_error ? 88 << (stream_error
89 (", stream error: " + XmlElementToString(*stream_error)) : 89 ? (", stream error: " + XmlElementToString(*stream_error))
90 ""); 90 : std::string());
91 91
92 DCHECK_EQ(error == buzz::XmppEngine::ERROR_STREAM, stream_error != NULL); 92 DCHECK_EQ(error == buzz::XmppEngine::ERROR_STREAM, stream_error != NULL);
93 93
94 // Check for redirection. We expect something like: 94 // Check for redirection. We expect something like:
95 // 95 //
96 // <stream:error><see-other-host xmlns="urn:ietf:params:xml:ns:xmpp-streams"/> <str:text xmlns:str="urn:ietf:params:xml:ns:xmpp-streams">talk.google.com</str:t ext></stream:error> [2] 96 // <stream:error><see-other-host xmlns="urn:ietf:params:xml:ns:xmpp-streams"/> <str:text xmlns:str="urn:ietf:params:xml:ns:xmpp-streams">talk.google.com</str:t ext></stream:error> [2]
97 // 97 //
98 // There are some differences from the spec [1]: 98 // There are some differences from the spec [1]:
99 // 99 //
100 // - we expect a separate text element with the redirection info 100 // - we expect a separate text element with the redirection info
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 client_settings.token_service(), 173 client_settings.token_service(),
174 login_settings_.auth_mechanism()); 174 login_settings_.auth_mechanism());
175 xmpp_connection_.reset( 175 xmpp_connection_.reset(
176 new XmppConnection(client_settings, 176 new XmppConnection(client_settings,
177 login_settings_.request_context_getter(), 177 login_settings_.request_context_getter(),
178 this, 178 this,
179 pre_xmpp_auth)); 179 pre_xmpp_auth));
180 } 180 }
181 181
182 } // namespace notifier 182 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/base/gaia_token_pre_xmpp_auth.cc ('k') | jingle/notifier/communicator/single_login_attempt_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698