Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / sync / tools / null_invalidation_state_tracker.cc
blob8e997846a906a514c0366d8d25752f1577a40b2c
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
3 // found in the LICENSE file.
5 #include "sync/tools/null_invalidation_state_tracker.h"
7 #include "base/base64.h"
8 #include "base/bind.h"
9 #include "base/callback.h"
10 #include "base/location.h"
11 #include "base/logging.h"
12 #include "base/task_runner.h"
13 #include "components/invalidation/public/invalidation_util.h"
15 namespace syncer {
17 NullInvalidationStateTracker::NullInvalidationStateTracker() {}
18 NullInvalidationStateTracker::~NullInvalidationStateTracker() {}
20 void NullInvalidationStateTracker::ClearAndSetNewClientId(
21 const std::string& data) {
22 LOG(INFO) << "Setting invalidator client ID to: " << data;
25 std::string NullInvalidationStateTracker::GetInvalidatorClientId() const {
26 // The caller of this function is probably looking for an ID it can use to
27 // identify this client as the originator of some notifiable change. It does
28 // this so the invalidation server can prevent it from being notified of its
29 // own changes. This invalidation state tracker doesn't remember its ID, so
30 // it can't support this feature.
31 NOTREACHED() << "This state tracker does not support reflection-blocking";
32 return std::string();
35 std::string NullInvalidationStateTracker::GetBootstrapData() const {
36 return std::string();
39 void NullInvalidationStateTracker::SetBootstrapData(const std::string& data) {
40 std::string base64_data;
41 base::Base64Encode(data, &base64_data);
42 LOG(INFO) << "Setting bootstrap data to: " << base64_data;
45 void NullInvalidationStateTracker::Clear() {
46 // We have no members to clear.
49 void NullInvalidationStateTracker::SetSavedInvalidations(
50 const UnackedInvalidationsMap& states) {
51 // Do nothing.
54 UnackedInvalidationsMap
55 NullInvalidationStateTracker::GetSavedInvalidations() const {
56 return UnackedInvalidationsMap();
59 } // namespace syncer