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

Side by Side Diff: chrome/browser/sync/notifier/chrome_system_resources.cc

Issue 9190029: use push messaging in cache invalidation xmpp channel (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 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
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 "chrome/browser/sync/notifier/chrome_system_resources.h" 5 #include "chrome/browser/sync/notifier/chrome_system_resources.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <cstring> 8 #include <cstring>
9 #include <string> 9 #include <string>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 void ChromeNetwork::UpdatePacketHandler( 224 void ChromeNetwork::UpdatePacketHandler(
225 CacheInvalidationPacketHandler* packet_handler) { 225 CacheInvalidationPacketHandler* packet_handler) {
226 packet_handler_ = packet_handler; 226 packet_handler_ = packet_handler;
227 if (packet_handler_ != NULL) { 227 if (packet_handler_ != NULL) {
228 packet_handler_->SetMessageReceiver( 228 packet_handler_->SetMessageReceiver(
229 new invalidation::MessageCallback( 229 new invalidation::MessageCallback(
230 base::Bind(&ChromeNetwork::HandleInboundMessage, 230 base::Bind(&ChromeNetwork::HandleInboundMessage,
231 weak_factory_.GetWeakPtr()))); 231 weak_factory_.GetWeakPtr())));
232 } 232 }
233 packet_handler_->SendSubscriptionRequest();
233 } 234 }
234 235
235 void ChromeNetwork::HandleInboundMessage(const std::string& incoming_message) { 236 void ChromeNetwork::HandleInboundMessage(const std::string& incoming_message) {
236 if (incoming_receiver_.get()) { 237 if (incoming_receiver_.get()) {
237 incoming_receiver_->Run(incoming_message); 238 incoming_receiver_->Run(incoming_message);
238 } 239 }
239 } 240 }
240 241
241 ChromeSystemResources::ChromeSystemResources(StateWriter* state_writer) 242 ChromeSystemResources::ChromeSystemResources(StateWriter* state_writer)
242 : is_started_(false), 243 : is_started_(false),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 289
289 ChromeScheduler* ChromeSystemResources::internal_scheduler() { 290 ChromeScheduler* ChromeSystemResources::internal_scheduler() {
290 return internal_scheduler_.get(); 291 return internal_scheduler_.get();
291 } 292 }
292 293
293 ChromeScheduler* ChromeSystemResources::listener_scheduler() { 294 ChromeScheduler* ChromeSystemResources::listener_scheduler() {
294 return listener_scheduler_.get(); 295 return listener_scheduler_.get();
295 } 296 }
296 297
297 } // namespace sync_notifier 298 } // namespace sync_notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698