summaryrefslogtreecommitdiffstats
path: root/jingle/notifier
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
commit69d7f89d6a93e0fbce451960287066195c6d4ea0 (patch)
tree51c8c1f971d39d652ec38ed76070539bb33e85c7 /jingle/notifier
parente3748a79b523a8d365d4a33ef986eebb4186fa78 (diff)
downloadchromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.zip
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.gz
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.bz2
Revert "Rewrite std::string("") to std::string(), Linux edition."
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/notifier')
-rw-r--r--jingle/notifier/base/gaia_token_pre_xmpp_auth.cc7
-rw-r--r--jingle/notifier/communicator/single_login_attempt.cc6
-rw-r--r--jingle/notifier/communicator/single_login_attempt_unittest.cc6
3 files changed, 9 insertions, 10 deletions
diff --git a/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc b/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
index f7ddf8d..24aa6a9 100644
--- a/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
+++ b/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
@@ -101,10 +101,9 @@ std::string GaiaTokenPreXmppAuth::GetAuthMechanism() const {
std::string GaiaTokenPreXmppAuth::ChooseBestSaslMechanism(
const std::vector<std::string> & mechanisms, bool encrypted) {
- return (std::find(mechanisms.begin(), mechanisms.end(), auth_mechanism_) !=
- mechanisms.end())
- ? auth_mechanism_
- : std::string();
+ return (std::find(mechanisms.begin(),
+ mechanisms.end(), auth_mechanism_) !=
+ mechanisms.end()) ? auth_mechanism_ : "";
}
buzz::SaslMechanism* GaiaTokenPreXmppAuth::CreateSaslMechanism(
diff --git a/jingle/notifier/communicator/single_login_attempt.cc b/jingle/notifier/communicator/single_login_attempt.cc
index 49fcdee..dda0cfe 100644
--- a/jingle/notifier/communicator/single_login_attempt.cc
+++ b/jingle/notifier/communicator/single_login_attempt.cc
@@ -85,9 +85,9 @@ net::HostPortPair ParseRedirectText(const std::string& redirect_text) {
void SingleLoginAttempt::OnError(buzz::XmppEngine::Error error, int subcode,
const buzz::XmlElement* stream_error) {
DVLOG(1) << "Error: " << error << ", subcode: " << subcode
- << (stream_error
- ? (", stream error: " + XmlElementToString(*stream_error))
- : std::string());
+ << (stream_error ?
+ (", stream error: " + XmlElementToString(*stream_error)) :
+ "");
DCHECK_EQ(error == buzz::XmppEngine::ERROR_STREAM, stream_error != NULL);
diff --git a/jingle/notifier/communicator/single_login_attempt_unittest.cc b/jingle/notifier/communicator/single_login_attempt_unittest.cc
index 4d009c2..582b808 100644
--- a/jingle/notifier/communicator/single_login_attempt_unittest.cc
+++ b/jingle/notifier/communicator/single_login_attempt_unittest.cc
@@ -219,7 +219,7 @@ TEST_F(SingleLoginAttemptTest, RedirectInvalidPort) {
// Fire an empty redirect and make sure the delegate does not get a
// redirect.
TEST_F(SingleLoginAttemptTest, RedirectEmpty) {
- scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(std::string()));
+ scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(""));
FireRedirect(redirect_error.get());
EXPECT_EQ(IDLE, fake_delegate_.state());
}
@@ -227,7 +227,7 @@ TEST_F(SingleLoginAttemptTest, RedirectEmpty) {
// Fire a redirect with a missing text element and make sure the
// delegate does not get a redirect.
TEST_F(SingleLoginAttemptTest, RedirectMissingText) {
- scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(std::string()));
+ scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(""));
redirect_error->RemoveChildAfter(redirect_error->FirstChild());
FireRedirect(redirect_error.get());
EXPECT_EQ(IDLE, fake_delegate_.state());
@@ -236,7 +236,7 @@ TEST_F(SingleLoginAttemptTest, RedirectMissingText) {
// Fire a redirect with a missing see-other-host element and make sure
// the delegate does not get a redirect.
TEST_F(SingleLoginAttemptTest, RedirectMissingSeeOtherHost) {
- scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(std::string()));
+ scoped_ptr<buzz::XmlElement> redirect_error(MakeRedirectError(""));
redirect_error->RemoveChildAfter(NULL);
FireRedirect(redirect_error.get());
EXPECT_EQ(IDLE, fake_delegate_.state());