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

Side by Side Diff: components/offline_pages/background/request_queue_in_memory_store.h

Issue 1951483002: [Offline pages] Adding in memory request queue store with tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Udpating name of variable to make code more readable Created 4 years, 7 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 COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
7
8 #include <stdint.h>
9
10 #include <map>
11
12 #include "base/macros.h"
13 #include "components/offline_pages/background/request_queue_store.h"
14
15 namespace offline_pages {
16
17 class SavePageRequest;
18
19 // Interface for classes storing save page requests.
20 class RequestQueueInMemoryStore : public RequestQueueStore {
21 public:
22 RequestQueueInMemoryStore();
23 ~RequestQueueInMemoryStore() override;
24
25 // RequestQueueStore implementaiton.
26 void GetRequests(const GetRequestsCallback& callback) override;
27 void AddOrUpdateRequest(const SavePageRequest& request,
28 const UpdateCallback& callback) override;
29 void RemoveRequests(const std::vector<int64_t>& request_ids,
30 const RemoveCallback& callback) override;
31 void Reset(const ResetCallback& callback) override;
32
33 private:
34 typedef std::map<int64_t, SavePageRequest> RequestsMap;
35 RequestsMap requests_;
36
37 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore);
38 };
39
40 } // namespace offline_pages
41
42 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/BUILD.gn ('k') | components/offline_pages/background/request_queue_in_memory_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698