Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/sync/invalidations/invalidator_storage.h

Issue 10824140: Add InvalidationStateTracker::Forget() to erase an entry from storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client target Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/invalidations/invalidator_storage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Wraps PrefService in an InvalidationStateTracker to allow SyncNotifiers 5 // Wraps PrefService in an InvalidationStateTracker to allow SyncNotifiers
6 // to use PrefService as persistence for invalidation state. It is not thread 6 // to use PrefService as persistence for invalidation state. It is not thread
7 // safe, and lives on the UI thread. 7 // safe, and lives on the UI thread.
8 8
9 #ifndef CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ 9 #ifndef CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_
10 #define CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ 10 #define CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_
(...skipping 27 matching lines...) Expand all
38 virtual ~InvalidatorStorage(); 38 virtual ~InvalidatorStorage();
39 39
40 // Erases invalidation versions and state stored on disk. 40 // Erases invalidation versions and state stored on disk.
41 void Clear(); 41 void Clear();
42 42
43 // InvalidationStateTracker implementation. 43 // InvalidationStateTracker implementation.
44 virtual syncer::InvalidationVersionMap GetAllMaxVersions() const 44 virtual syncer::InvalidationVersionMap GetAllMaxVersions() const
45 OVERRIDE; 45 OVERRIDE;
46 virtual void SetMaxVersion(const invalidation::ObjectId& id, 46 virtual void SetMaxVersion(const invalidation::ObjectId& id,
47 int64 max_version) OVERRIDE; 47 int64 max_version) OVERRIDE;
48 virtual void Forget(const syncer::ObjectIdSet& ids) OVERRIDE;
48 // TODO(tim): These are not yet used. Bug 124140. 49 // TODO(tim): These are not yet used. Bug 124140.
49 virtual void SetInvalidationState(const std::string& state) OVERRIDE; 50 virtual void SetInvalidationState(const std::string& state) OVERRIDE;
50 virtual std::string GetInvalidationState() const OVERRIDE; 51 virtual std::string GetInvalidationState() const OVERRIDE;
51 52
52 private: 53 private:
53 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest, SerializeEmptyMap); 54 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest, SerializeEmptyMap);
54 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest, 55 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest,
55 DeserializeFromListOutOfRange); 56 DeserializeFromListOutOfRange);
56 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest, 57 FRIEND_TEST_ALL_PREFIXES(InvalidatorStorageTest,
57 DeserializeFromListInvalidFormat); 58 DeserializeFromListInvalidFormat);
(...skipping 27 matching lines...) Expand all
85 86
86 // May be NULL. 87 // May be NULL.
87 PrefService* const pref_service_; 88 PrefService* const pref_service_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(InvalidatorStorage); 90 DISALLOW_COPY_AND_ASSIGN(InvalidatorStorage);
90 }; 91 };
91 92
92 } // namespace browser_sync 93 } // namespace browser_sync
93 94
94 #endif // CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_ 95 #endif // CHROME_BROWSER_SYNC_INVALIDATIONS_INVALIDATOR_STORAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/invalidations/invalidator_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698