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

Side by Side Diff: jingle/notifier/base/notifier_options_util.cc

Issue 10382003: Changes needed to roll libjingle r141 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "jingle/notifier/base/notifier_options_util.h" 5 #include "jingle/notifier/base/notifier_options_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "jingle/notifier/base/const_communicator.h" 8 #include "jingle/notifier/base/const_communicator.h"
9 #include "jingle/notifier/base/notifier_options.h" 9 #include "jingle/notifier/base/notifier_options.h"
10 #include "talk/xmpp/constants.h"
10 #include "talk/xmpp/jid.h" 11 #include "talk/xmpp/jid.h"
11 12
12 namespace notifier { 13 namespace notifier {
13 14
14 buzz::XmppClientSettings MakeXmppClientSettings( 15 buzz::XmppClientSettings MakeXmppClientSettings(
15 const NotifierOptions& notifier_options, 16 const NotifierOptions& notifier_options,
16 const std::string& email, const std::string& token, 17 const std::string& email, const std::string& token,
17 const std::string& token_service) { 18 const std::string& token_service) {
18 buzz::Jid jid = buzz::Jid(email); 19 buzz::Jid jid = buzz::Jid(email);
19 DCHECK(!jid.node().empty()); 20 DCHECK(!jid.node().empty());
20 DCHECK(jid.IsValid()); 21 DCHECK(jid.IsValid());
21 22
22 buzz::XmppClientSettings xmpp_client_settings; 23 buzz::XmppClientSettings xmpp_client_settings;
23 xmpp_client_settings.set_user(jid.node()); 24 xmpp_client_settings.set_user(jid.node());
24 xmpp_client_settings.set_resource("chrome-sync"); 25 xmpp_client_settings.set_resource("chrome-sync");
25 xmpp_client_settings.set_host(jid.domain()); 26 xmpp_client_settings.set_host(jid.domain());
26 xmpp_client_settings.set_use_tls(buzz::TLS_ENABLED); 27 xmpp_client_settings.set_use_tls(buzz::TLS_ENABLED);
27 xmpp_client_settings.set_auth_cookie( 28 xmpp_client_settings.set_auth_token(buzz::AUTH_MECHANISM_GOOGLE_TOKEN,
akalin 2012/05/11 18:04:05 newline after (, indent four spaces
28 notifier_options.invalidate_xmpp_login ? 29 notifier_options.invalidate_xmpp_login ?
29 token + "bogus" : token); 30 token + "bogus" : token);
30 xmpp_client_settings.set_token_service(token_service); 31 xmpp_client_settings.set_token_service(token_service);
31 if (notifier_options.allow_insecure_connection) { 32 if (notifier_options.allow_insecure_connection) {
32 xmpp_client_settings.set_allow_plain(true); 33 xmpp_client_settings.set_allow_plain(true);
33 xmpp_client_settings.set_use_tls(buzz::TLS_DISABLED); 34 xmpp_client_settings.set_use_tls(buzz::TLS_DISABLED);
34 } 35 }
35 return xmpp_client_settings; 36 return xmpp_client_settings;
36 } 37 }
37 38
(...skipping 15 matching lines...) Expand all
53 servers.push_back( 54 servers.push_back(
54 ServerInformation( 55 ServerInformation(
55 net::HostPortPair("talkx.l.google.com", 56 net::HostPortPair("talkx.l.google.com",
56 notifier::kDefaultXmppPort), 57 notifier::kDefaultXmppPort),
57 true)); 58 true));
58 } 59 }
59 return servers; 60 return servers;
60 } 61 }
61 62
62 } // namespace notifier 63 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698