blob: 60cd1cb7e7cee69a3e7e3a2d55f7ebf88c91a884 [file] [log] [blame]
[email protected]001bbfdc2014-07-17 19:28:461// Copyright 2014 The Chromium Authors. All rights reserved.
[email protected]e39ebd72011-03-14 07:13:252// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
knn062cdbb2015-06-26 18:18:425#ifndef COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_HANDLER_H_
6#define COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_HANDLER_H_
[email protected]e39ebd72011-03-14 07:13:257
[email protected]b8868be2014-07-10 23:26:388#include <string>
9
knn062cdbb2015-06-26 18:18:4210#include "components/invalidation/public/invalidation_export.h"
11#include "components/invalidation/public/invalidator_state.h"
[email protected]e39ebd72011-03-14 07:13:2512
[email protected]65f173552012-06-28 22:43:5813namespace syncer {
[email protected]e39ebd72011-03-14 07:13:2514
[email protected]a7b16392013-11-26 22:46:2615class ObjectIdInvalidationMap;
16
[email protected]001bbfdc2014-07-17 19:28:4617class INVALIDATION_EXPORT InvalidationHandler {
[email protected]e39ebd72011-03-14 07:13:2518 public:
[email protected]b8868be2014-07-10 23:26:3819 InvalidationHandler();
20
[email protected]08a6f9992012-09-07 19:19:1621 // Called when the invalidator state changes.
22 virtual void OnInvalidatorStateChange(InvalidatorState state) = 0;
[email protected]2d3d1d12012-06-18 20:50:2823
[email protected]08a6f9992012-09-07 19:19:1624 // Called when a invalidation is received. The per-id states are in
25 // |id_state_map| and the source is in |source|. Note that this may be
26 // called regardless of the current invalidator state.
27 virtual void OnIncomingInvalidation(
[email protected]0d0b59d2013-02-02 00:24:4728 const ObjectIdInvalidationMap& invalidation_map) = 0;
[email protected]870bcb32012-06-11 22:27:5429
[email protected]9b0d66b2014-02-20 13:16:0130 virtual std::string GetOwnerName() const = 0;
31
[email protected]870bcb32012-06-11 22:27:5432 protected:
[email protected]b8868be2014-07-10 23:26:3833 virtual ~InvalidationHandler();
[email protected]e39ebd72011-03-14 07:13:2534};
[email protected]0a80fed2011-03-24 22:31:4835
[email protected]65f173552012-06-28 22:43:5836} // namespace syncer
[email protected]0a80fed2011-03-24 22:31:4837
knn062cdbb2015-06-26 18:18:4238#endif // COMPONENTS_INVALIDATION_PUBLIC_INVALIDATION_HANDLER_H_