OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/invalidation/ticl_invalidation_service.h" | 5 #include "components/invalidation/ticl_invalidation_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "components/gcm_driver/gcm_driver.h" | 9 #include "components/gcm_driver/gcm_driver.h" |
10 #include "components/invalidation/gcm_invalidation_bridge.h" | 10 #include "components/invalidation/gcm_invalidation_bridge.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 << "Deferring start until we have an access token."; | 351 << "Deferring start until we have an access token."; |
352 RequestAccessToken(); | 352 RequestAccessToken(); |
353 return; | 353 return; |
354 } | 354 } |
355 | 355 |
356 syncer::NetworkChannelCreator network_channel_creator; | 356 syncer::NetworkChannelCreator network_channel_creator; |
357 | 357 |
358 switch (network_channel) { | 358 switch (network_channel) { |
359 case PUSH_CLIENT_CHANNEL: { | 359 case PUSH_CLIENT_CHANNEL: { |
360 notifier::NotifierOptions options = | 360 notifier::NotifierOptions options = |
361 ParseNotifierOptions(*CommandLine::ForCurrentProcess()); | 361 ParseNotifierOptions(*base::CommandLine::ForCurrentProcess()); |
362 options.request_context_getter = request_context_; | 362 options.request_context_getter = request_context_; |
363 options.auth_mechanism = "X-OAUTH2"; | 363 options.auth_mechanism = "X-OAUTH2"; |
364 network_channel_options_.SetString("Options.HostPort", | 364 network_channel_options_.SetString("Options.HostPort", |
365 options.xmpp_host_port.ToString()); | 365 options.xmpp_host_port.ToString()); |
366 network_channel_options_.SetString("Options.AuthMechanism", | 366 network_channel_options_.SetString("Options.AuthMechanism", |
367 options.auth_mechanism); | 367 options.auth_mechanism); |
368 DCHECK_EQ(notifier::NOTIFICATION_SERVER, options.notification_method); | 368 DCHECK_EQ(notifier::NOTIFICATION_SERVER, options.notification_method); |
369 network_channel_creator = | 369 network_channel_creator = |
370 syncer::NonBlockingInvalidator::MakePushClientChannelCreator(options); | 370 syncer::NonBlockingInvalidator::MakePushClientChannelCreator(options); |
371 break; | 371 break; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } | 427 } |
428 | 428 |
429 void TiclInvalidationService::StopInvalidator() { | 429 void TiclInvalidationService::StopInvalidator() { |
430 DCHECK(invalidator_); | 430 DCHECK(invalidator_); |
431 gcm_invalidation_bridge_.reset(); | 431 gcm_invalidation_bridge_.reset(); |
432 invalidator_->UnregisterHandler(this); | 432 invalidator_->UnregisterHandler(this); |
433 invalidator_.reset(); | 433 invalidator_.reset(); |
434 } | 434 } |
435 | 435 |
436 } // namespace invalidation | 436 } // namespace invalidation |
OLD | NEW |