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

Side by Side Diff: components/offline_pages/core/offline_store_types.h

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_STORE_TYPES_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_STORE_TYPES_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 // This file contains common types and callbacks used by storage of various 13 // This file contains common types and callbacks used by storage of various
14 // offline page related components. 14 // offline page related components.
15 namespace offline_pages { 15 namespace offline_pages {
16 16
(...skipping 16 matching lines...) Expand all
33 STORE_ERROR, 33 STORE_ERROR,
34 }; 34 };
35 35
36 // List of item action statuses mapped to item ID. 36 // List of item action statuses mapped to item ID.
37 typedef std::vector<std::pair<int64_t, ItemActionStatus>> MultipleItemStatuses; 37 typedef std::vector<std::pair<int64_t, ItemActionStatus>> MultipleItemStatuses;
38 38
39 // Collective result for store update. 39 // Collective result for store update.
40 template <typename T> 40 template <typename T>
41 class StoreUpdateResult { 41 class StoreUpdateResult {
42 public: 42 public:
43 explicit StoreUpdateResult(StoreState state) 43 explicit StoreUpdateResult(StoreState state) : store_state(state) {}
44 : store_state(state) {}
45 ~StoreUpdateResult() {} 44 ~StoreUpdateResult() {}
46 45
47 // List of Offline ID to item action status mappings. 46 // List of Offline ID to item action status mappings.
48 // It is meant to be consumed by the original caller of the operation. 47 // It is meant to be consumed by the original caller of the operation.
49 MultipleItemStatuses item_statuses; 48 MultipleItemStatuses item_statuses;
50 49
51 // List of successfully updated offline page items as seen after operation 50 // List of successfully updated offline page items as seen after operation
52 // concludes. It is meant to be used when passing to the observers. 51 // concludes. It is meant to be used when passing to the observers.
53 std::vector<T> updated_items; 52 std::vector<T> updated_items;
54 53
55 // State of the store after the operation is done. 54 // State of the store after the operation is done.
56 StoreState store_state; 55 StoreState store_state;
57 }; 56 };
58 57
59 } // namespace offline_pages 58 } // namespace offline_pages
60 59
61 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_STORE_TYPES_H_ 60 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_STORE_TYPES_H_
OLDNEW
« no previous file with comments | « components/offline_pages/core/offline_page_types.h ('k') | components/offline_pages/core/request_header/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698