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

Side by Side Diff: blimp/common/blob_cache/in_memory_blob_cache.h

Issue 2626423004: Remove all //blimp code. (Closed)
Patch Set: One last(?) `git merge` for good measure. Created 3 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef BLIMP_COMMON_BLOB_CACHE_IN_MEMORY_BLOB_CACHE_H_
6 #define BLIMP_COMMON_BLOB_CACHE_IN_MEMORY_BLOB_CACHE_H_
7
8 #include <map>
9 #include <string>
10 #include <vector>
11
12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h"
14 #include "blimp/common/blimp_common_export.h"
15 #include "blimp/common/blob_cache/blob_cache.h"
16
17 namespace blimp {
18
19 // InMemoryBlobCache provides an in-memory implementation of BlobCache that
20 // never evicts items.
21 class BLIMP_COMMON_EXPORT InMemoryBlobCache : public BlobCache {
22 public:
23 InMemoryBlobCache();
24 ~InMemoryBlobCache() override;
25
26 // BlobCache implementation.
27 std::vector<BlobId> GetCachedBlobIds() const override;
28 bool Contains(const BlobId& id) const override;
29 void Put(const BlobId& id, BlobDataPtr data) override;
30 BlobDataPtr Get(const BlobId& id) const override;
31
32 private:
33 std::map<const BlobId, BlobDataPtr> cache_;
34
35 DISALLOW_COPY_AND_ASSIGN(InMemoryBlobCache);
36 };
37
38 } // namespace blimp
39
40 #endif // BLIMP_COMMON_BLOB_CACHE_IN_MEMORY_BLOB_CACHE_H_
OLDNEW
« no previous file with comments | « blimp/common/blob_cache/id_util_unittest.cc ('k') | blimp/common/blob_cache/in_memory_blob_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698