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

Side by Side Diff: chrome/browser/sync/tools/sync_listen_notifications.cc

Issue 6016001: Fix nits. Add 'const'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Don't make accessors const Created 9 years, 11 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
« no previous file with comments | « no previous file | jingle/notifier/base/chrome_async_socket.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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 xmpp_client_settings.set_pass( 292 xmpp_client_settings.set_pass(
293 talk_base::CryptString(insecure_crypt_string)); 293 talk_base::CryptString(insecure_crypt_string));
294 talk_base::SocketAddress addr(server, port); 294 talk_base::SocketAddress addr(server, port);
295 if (!addr.ResolveIP()) { 295 if (!addr.ResolveIP()) {
296 LOG(ERROR) << "Could not resolve " << addr.ToString(); 296 LOG(ERROR) << "Could not resolve " << addr.ToString();
297 return -1; 297 return -1;
298 } 298 }
299 xmpp_client_settings.set_server(addr); 299 xmpp_client_settings.set_server(addr);
300 300
301 net::CertVerifier cert_verifier; 301 net::CertVerifier cert_verifier;
302
303 MessageLoopForIO message_loop; 302 MessageLoopForIO message_loop;
304 303
305 // Connect and listen. 304 // Connect and listen.
306 ServerNotifierDelegate server_notifier_delegate( 305 ServerNotifierDelegate server_notifier_delegate(
307 server_notifier_state); 306 server_notifier_state);
308 LegacyNotifierDelegate legacy_notifier_delegate( 307 LegacyNotifierDelegate legacy_notifier_delegate(
309 legacy_notifier_send_initial_update); 308 legacy_notifier_send_initial_update);
310 std::vector<XmppNotificationClient::Observer*> observers; 309 std::vector<XmppNotificationClient::Observer*> observers;
311 if (use_legacy_notifier) { 310 if (use_legacy_notifier) {
312 observers.push_back(&legacy_notifier_delegate); 311 observers.push_back(&legacy_notifier_delegate);
313 } else { 312 } else {
314 observers.push_back(&server_notifier_delegate); 313 observers.push_back(&server_notifier_delegate);
315 } 314 }
316 XmppNotificationClient xmpp_notification_client( 315 XmppNotificationClient xmpp_notification_client(
317 observers.begin(), observers.end()); 316 observers.begin(), observers.end());
318 xmpp_notification_client.Run(xmpp_client_settings, &cert_verifier); 317 xmpp_notification_client.Run(xmpp_client_settings, &cert_verifier);
319 318
320 return 0; 319 return 0;
321 } 320 }
OLDNEW
« no previous file with comments | « no previous file | jingle/notifier/base/chrome_async_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698