OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ | 5 #ifndef COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ |
6 #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ | 6 #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class SESSIONS_EXPORT SerializedNavigationEntry { | 43 class SESSIONS_EXPORT SerializedNavigationEntry { |
44 public: | 44 public: |
45 enum BlockedState { | 45 enum BlockedState { |
46 STATE_INVALID = 0, | 46 STATE_INVALID = 0, |
47 STATE_ALLOWED = 1, | 47 STATE_ALLOWED = 1, |
48 STATE_BLOCKED = 2, | 48 STATE_BLOCKED = 2, |
49 }; | 49 }; |
50 | 50 |
51 // Creates an invalid (index < 0) SerializedNavigationEntry. | 51 // Creates an invalid (index < 0) SerializedNavigationEntry. |
52 SerializedNavigationEntry(); | 52 SerializedNavigationEntry(); |
| 53 SerializedNavigationEntry(const SerializedNavigationEntry& other); |
53 ~SerializedNavigationEntry(); | 54 ~SerializedNavigationEntry(); |
54 | 55 |
55 // Construct a SerializedNavigationEntry for a particular index from a sync | 56 // Construct a SerializedNavigationEntry for a particular index from a sync |
56 // protocol buffer. Note that the sync protocol buffer doesn't contain all | 57 // protocol buffer. Note that the sync protocol buffer doesn't contain all |
57 // SerializedNavigationEntry fields. Also, the timestamp of the returned | 58 // SerializedNavigationEntry fields. Also, the timestamp of the returned |
58 // SerializedNavigationEntry is nulled out, as we assume that the protocol | 59 // SerializedNavigationEntry is nulled out, as we assume that the protocol |
59 // buffer is from a foreign session. | 60 // buffer is from a foreign session. |
60 static SerializedNavigationEntry FromSyncData( | 61 static SerializedNavigationEntry FromSyncData( |
61 int index, | 62 int index, |
62 const sync_pb::TabNavigation& sync_data); | 63 const sync_pb::TabNavigation& sync_data); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 std::vector<GURL> redirect_chain_; // Not persisted. | 139 std::vector<GURL> redirect_chain_; // Not persisted. |
139 | 140 |
140 // Additional information. | 141 // Additional information. |
141 BlockedState blocked_state_; | 142 BlockedState blocked_state_; |
142 std::set<std::string> content_pack_categories_; | 143 std::set<std::string> content_pack_categories_; |
143 }; | 144 }; |
144 | 145 |
145 } // namespace sessions | 146 } // namespace sessions |
146 | 147 |
147 #endif // COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ | 148 #endif // COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ |
OLD | NEW |