| 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/p2p_invalidation_service.h" | 5 #include "components/invalidation/p2p_invalidation_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/invalidation/invalidation_service_util.h" | 8 #include "components/invalidation/invalidation_service_util.h" |
| 9 #include "components/invalidation/p2p_invalidator.h" | 9 #include "components/invalidation/p2p_invalidator.h" |
| 10 #include "google_apis/gaia/identity_provider.h" | 10 #include "google_apis/gaia/identity_provider.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 P2PInvalidationService::~P2PInvalidationService() { | 36 P2PInvalidationService::~P2PInvalidationService() { |
| 37 } | 37 } |
| 38 | 38 |
| 39 void P2PInvalidationService::UpdateCredentials(const std::string& username, | 39 void P2PInvalidationService::UpdateCredentials(const std::string& username, |
| 40 const std::string& password) { | 40 const std::string& password) { |
| 41 invalidator_->UpdateCredentials(username, password); | 41 invalidator_->UpdateCredentials(username, password); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void P2PInvalidationService::Shutdown() { | |
| 45 invalidator_.reset(); | |
| 46 } | |
| 47 | |
| 48 void P2PInvalidationService::RegisterInvalidationHandler( | 44 void P2PInvalidationService::RegisterInvalidationHandler( |
| 49 syncer::InvalidationHandler* handler) { | 45 syncer::InvalidationHandler* handler) { |
| 50 invalidator_->RegisterHandler(handler); | 46 invalidator_->RegisterHandler(handler); |
| 51 } | 47 } |
| 52 | 48 |
| 53 void P2PInvalidationService::UpdateRegisteredInvalidationIds( | 49 void P2PInvalidationService::UpdateRegisteredInvalidationIds( |
| 54 syncer::InvalidationHandler* handler, | 50 syncer::InvalidationHandler* handler, |
| 55 const syncer::ObjectIdSet& ids) { | 51 const syncer::ObjectIdSet& ids) { |
| 56 invalidator_->UpdateRegisteredIds(handler, ids); | 52 invalidator_->UpdateRegisteredIds(handler, ids); |
| 57 } | 53 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 82 base::Callback<void(const base::DictionaryValue&)> caller) const { | 78 base::Callback<void(const base::DictionaryValue&)> caller) const { |
| 83 base::DictionaryValue value; | 79 base::DictionaryValue value; |
| 84 caller.Run(value); | 80 caller.Run(value); |
| 85 } | 81 } |
| 86 | 82 |
| 87 IdentityProvider* P2PInvalidationService::GetIdentityProvider() { | 83 IdentityProvider* P2PInvalidationService::GetIdentityProvider() { |
| 88 return identity_provider_.get(); | 84 return identity_provider_.get(); |
| 89 } | 85 } |
| 90 | 86 |
| 91 } // namespace invalidation | 87 } // namespace invalidation |
| OLD | NEW |