| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/webdata/web_database.h" | 5 #include "chrome/browser/webdata/web_database.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // has_all_images Do we have all the images? | 153 // has_all_images Do we have all the images? |
| 154 // | 154 // |
| 155 //////////////////////////////////////////////////////////////////////////////// | 155 //////////////////////////////////////////////////////////////////////////////// |
| 156 | 156 |
| 157 using base::Time; | 157 using base::Time; |
| 158 | 158 |
| 159 namespace { | 159 namespace { |
| 160 | 160 |
| 161 typedef std::vector<Tuple3<int64, string16, string16> > AutofillElementList; | 161 typedef std::vector<Tuple3<int64, string16, string16> > AutofillElementList; |
| 162 | 162 |
| 163 // Current version number. | 163 // Current version number. Note: when changing the current version number, |
| 164 // corresponding changes must happen in the unit tests, and new migration test |
| 165 // added. See |WebDatabaseMigrationTest::kCurrentTestedVersionNumber|. |
| 164 const int kCurrentVersionNumber = 25; | 166 const int kCurrentVersionNumber = 25; |
| 165 const int kCompatibleVersionNumber = 25; | 167 const int kCompatibleVersionNumber = 25; |
| 166 const int kUrlIdPosition = 14; | 168 const int kUrlIdPosition = 14; |
| 167 | 169 |
| 168 // Keys used in the meta table. | 170 // Keys used in the meta table. |
| 169 const char* kDefaultSearchProviderKey = "Default Search Provider ID"; | 171 const char* kDefaultSearchProviderKey = "Default Search Provider ID"; |
| 170 const char* kBuiltinKeywordVersion = "Builtin Keyword Version"; | 172 const char* kBuiltinKeywordVersion = "Builtin Keyword Version"; |
| 171 | 173 |
| 172 // The maximum length allowed for form data. | 174 // The maximum length allowed for form data. |
| 173 const size_t kMaxDataLength = 1024; | 175 const size_t kMaxDataLength = 1024; |
| (...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2031 | 2033 |
| 2032 // Add successive versions here. Each should set the version number and | 2034 // Add successive versions here. Each should set the version number and |
| 2033 // compatible version number as appropriate, then fall through to the next | 2035 // compatible version number as appropriate, then fall through to the next |
| 2034 // case. | 2036 // case. |
| 2035 | 2037 |
| 2036 case kCurrentVersionNumber: | 2038 case kCurrentVersionNumber: |
| 2037 // No migration needed. | 2039 // No migration needed. |
| 2038 return; | 2040 return; |
| 2039 } | 2041 } |
| 2040 } | 2042 } |
| OLD | NEW |