OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
11 | 11 |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 "SELECT pair_id, count FROM autofill " | 1195 "SELECT pair_id, count FROM autofill " |
1196 "WHERE name = ? AND value = ?")); | 1196 "WHERE name = ? AND value = ?")); |
1197 if (!s) { | 1197 if (!s) { |
1198 NOTREACHED() << "Statement prepare failed"; | 1198 NOTREACHED() << "Statement prepare failed"; |
1199 return false; | 1199 return false; |
1200 } | 1200 } |
1201 | 1201 |
1202 s.BindString16(0, element.name()); | 1202 s.BindString16(0, element.name()); |
1203 s.BindString16(1, element.value()); | 1203 s.BindString16(1, element.value()); |
1204 | 1204 |
| 1205 *pair_id = 0; |
1205 *count = 0; | 1206 *count = 0; |
1206 | 1207 |
1207 if (s.Step()) { | 1208 if (s.Step()) { |
1208 *pair_id = s.ColumnInt64(0); | 1209 *pair_id = s.ColumnInt64(0); |
1209 *count = s.ColumnInt(1); | 1210 *count = s.ColumnInt(1); |
1210 } | 1211 } |
1211 | 1212 |
1212 return true; | 1213 return true; |
1213 } | 1214 } |
1214 | 1215 |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 | 2578 |
2578 // Add successive versions here. Each should set the version number and | 2579 // Add successive versions here. Each should set the version number and |
2579 // compatible version number as appropriate, then fall through to the next | 2580 // compatible version number as appropriate, then fall through to the next |
2580 // case. | 2581 // case. |
2581 | 2582 |
2582 case kCurrentVersionNumber: | 2583 case kCurrentVersionNumber: |
2583 // No migration needed. | 2584 // No migration needed. |
2584 return sql::INIT_OK; | 2585 return sql::INIT_OK; |
2585 } | 2586 } |
2586 } | 2587 } |
OLD | NEW |