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

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

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Made construction params a cost&. Created 3 years, 6 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CORE_OFFLINE_PAGE_ITEM_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string>
11
12 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
13 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
14 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "components/offline_pages/core/client_id.h"
15 #include "url/gurl.h" 14 #include "url/gurl.h"
16 15
17 namespace offline_pages { 16 namespace offline_pages {
18 17
19 struct ClientId {
20 // The namespace for the id (of course 'namespace' is a reserved word, so...)
21 std::string name_space;
22 // The id in the client's namespace. Opaque to us.
23 std::string id;
24
25 ClientId();
26 ClientId(std::string name_space, std::string id);
27
28 bool operator==(const ClientId& client_id) const;
29
30 bool operator<(const ClientId& client_id) const;
31 };
32
33 // Metadata of the offline page. 18 // Metadata of the offline page.
34 struct OfflinePageItem { 19 struct OfflinePageItem {
35 public: 20 public:
36 // Note that this should match with Flags enum in offline_pages.proto. 21 // Note that this should match with Flags enum in offline_pages.proto.
37 enum Flags { 22 enum Flags {
38 NO_FLAG = 0, 23 NO_FLAG = 0,
39 MARKED_FOR_DELETION = 0x1, 24 MARKED_FOR_DELETION = 0x1,
40 }; 25 };
41 26
42 OfflinePageItem(); 27 OfflinePageItem();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Flags about the state and behavior of the offline page. 67 // Flags about the state and behavior of the offline page.
83 Flags flags; 68 Flags flags;
84 // The original URL of the page if not empty. Otherwise, this is set to empty 69 // The original URL of the page if not empty. Otherwise, this is set to empty
85 // and |url| should be accessed instead. 70 // and |url| should be accessed instead.
86 GURL original_url; 71 GURL original_url;
87 }; 72 };
88 73
89 } // namespace offline_pages 74 } // namespace offline_pages
90 75
91 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_H_ 76 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ITEM_H_
OLDNEW
« no previous file with comments | « components/offline_pages/core/client_id.cc ('k') | components/offline_pages/core/offline_page_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698