OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/password_manager/login_database.h" | 5 #include "chrome/browser/password_manager/login_database.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 #include <limits> |
| 9 |
7 #include "base/time.h" | 10 #include "base/time.h" |
8 #include "chrome/common/sqlite_utils.h" | 11 #include "chrome/common/sqlite_utils.h" |
9 | 12 |
10 static const int kCurrentVersionNumber = 1; | 13 static const int kCurrentVersionNumber = 1; |
11 static const int kCompatibleVersionNumber = 1; | 14 static const int kCompatibleVersionNumber = 1; |
12 | 15 |
13 // Convenience enum for interacting with SQL queries that use all the columns. | 16 // Convenience enum for interacting with SQL queries that use all the columns. |
14 typedef enum { | 17 typedef enum { |
15 COLUMN_ORIGIN_URL = 0, | 18 COLUMN_ORIGIN_URL = 0, |
16 COLUMN_ACTION_URL, | 19 COLUMN_ACTION_URL, |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 312 |
310 int result; | 313 int result; |
311 while ((result = s.step()) == SQLITE_ROW) { | 314 while ((result = s.step()) == SQLITE_ROW) { |
312 PasswordForm* new_form = new PasswordForm(); | 315 PasswordForm* new_form = new PasswordForm(); |
313 InitPasswordFormFromStatement(new_form, &s); | 316 InitPasswordFormFromStatement(new_form, &s); |
314 | 317 |
315 forms->push_back(new_form); | 318 forms->push_back(new_form); |
316 } | 319 } |
317 return result == SQLITE_DONE; | 320 return result == SQLITE_DONE; |
318 } | 321 } |
OLD | NEW |