| OLD | NEW |
| 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 "sync/notifier/chrome_invalidation_client.h" | 5 #include "sync/notifier/chrome_invalidation_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 DCHECK(CalledOnValidThread()); | 44 DCHECK(CalledOnValidThread()); |
| 45 push_client_->RemoveObserver(this); | 45 push_client_->RemoveObserver(this); |
| 46 Stop(); | 46 Stop(); |
| 47 DCHECK(!listener_); | 47 DCHECK(!listener_); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void ChromeInvalidationClient::Start( | 50 void ChromeInvalidationClient::Start( |
| 51 const std::string& client_id, const std::string& client_info, | 51 const std::string& client_id, const std::string& client_info, |
| 52 const std::string& state, | 52 const std::string& state, |
| 53 const InvalidationVersionMap& initial_max_invalidation_versions, | 53 const InvalidationVersionMap& initial_max_invalidation_versions, |
| 54 const syncer::WeakHandle<InvalidationStateTracker>& | 54 const WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, |
| 55 invalidation_state_tracker, | |
| 56 Listener* listener) { | 55 Listener* listener) { |
| 57 DCHECK(CalledOnValidThread()); | 56 DCHECK(CalledOnValidThread()); |
| 58 Stop(); | 57 Stop(); |
| 59 | 58 |
| 60 chrome_system_resources_.set_platform(client_info); | 59 chrome_system_resources_.set_platform(client_info); |
| 61 chrome_system_resources_.Start(); | 60 chrome_system_resources_.Start(); |
| 62 | 61 |
| 63 // The Storage resource is implemented as a write-through cache. We populate | 62 // The Storage resource is implemented as a write-through cache. We populate |
| 64 // it with the initial state on startup, so subsequent writes go to disk and | 63 // it with the initial state on startup, so subsequent writes go to disk and |
| 65 // update the in-memory cache, while reads just return the cached state. | 64 // update the in-memory cache, while reads just return the cached state. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 EmitStateChange(); | 329 EmitStateChange(); |
| 331 } | 330 } |
| 332 | 331 |
| 333 void ChromeInvalidationClient::OnIncomingNotification( | 332 void ChromeInvalidationClient::OnIncomingNotification( |
| 334 const notifier::Notification& notification) { | 333 const notifier::Notification& notification) { |
| 335 DCHECK(CalledOnValidThread()); | 334 DCHECK(CalledOnValidThread()); |
| 336 // Do nothing, since this is already handled by |invalidation_client_|. | 335 // Do nothing, since this is already handled by |invalidation_client_|. |
| 337 } | 336 } |
| 338 | 337 |
| 339 } // namespace syncer | 338 } // namespace syncer |
| OLD | NEW |