OLD | NEW |
---|---|
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_PAGE_METADATA_STORE_SQL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_SQL_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_SQL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_SQL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 16 matching lines...) Expand all Loading... | |
27 // OfflinePageMetadataStoreSQL is an instance of OfflinePageMetadataStore | 27 // OfflinePageMetadataStoreSQL is an instance of OfflinePageMetadataStore |
28 // which is implemented using a SQLite database. | 28 // which is implemented using a SQLite database. |
29 // | 29 // |
30 // This store has a history of schema updates in pretty much every release. | 30 // This store has a history of schema updates in pretty much every release. |
31 // Original schema was delivered in M52. Since then, the following changes | 31 // Original schema was delivered in M52. Since then, the following changes |
32 // happened: | 32 // happened: |
33 // * In M53 expiration_time was added, | 33 // * In M53 expiration_time was added, |
34 // * In M54 title was added, | 34 // * In M54 title was added, |
35 // * In M55 we dropped the following fields (never used): version, status, | 35 // * In M55 we dropped the following fields (never used): version, status, |
36 // offline_url, user_initiated. | 36 // offline_url, user_initiated. |
37 // * In M56 original_url was added. | 37 // * In M56 we dropped expiration_time and added original_url. |
fgorski
2016/11/18 00:13:04
I think you should consider your patch for M57 no
romax
2016/11/18 20:50:49
Done.
| |
38 // | 38 // |
39 // Here is a procedure to update the schema for this store: | 39 // Here is a procedure to update the schema for this store: |
40 // * Decide how to detect that the store is on a particular version, which | 40 // * Decide how to detect that the store is on a particular version, which |
41 // typically means that a certain field exists or is missing. This happens in | 41 // typically means that a certain field exists or is missing. This happens in |
42 // Upgrade section of |CreateSchema| | 42 // Upgrade section of |CreateSchema| |
43 // * Work out appropriate change and apply it to all existing upgrade paths. In | 43 // * Work out appropriate change and apply it to all existing upgrade paths. In |
44 // the interest of performing a single update of the store, it upgrades from a | 44 // the interest of performing a single update of the store, it upgrades from a |
45 // detected version to the current one. This means that when making a change, | 45 // detected version to the current one. This means that when making a change, |
46 // more than a single query may have to be updated (in case of fields being | 46 // more than a single query may have to be updated (in case of fields being |
47 // removed or needed to be initialized to a specific, non-default value). | 47 // removed or needed to be initialized to a specific, non-default value). |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 StoreState state_; | 98 StoreState state_; |
99 | 99 |
100 base::WeakPtrFactory<OfflinePageMetadataStoreSQL> weak_ptr_factory_; | 100 base::WeakPtrFactory<OfflinePageMetadataStoreSQL> weak_ptr_factory_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreSQL); | 102 DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreSQL); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace offline_pages | 105 } // namespace offline_pages |
106 | 106 |
107 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_SQL_H_ | 107 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_SQL_H_ |
OLD | NEW |