OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/password_manager/core/browser/login_database.h" | 5 #include "components/password_manager/core/browser/login_database.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "google_apis/gaia/gaia_auth_util.h" | 21 #include "google_apis/gaia/gaia_auth_util.h" |
22 #include "google_apis/gaia/gaia_urls.h" | 22 #include "google_apis/gaia/gaia_urls.h" |
23 #include "sql/connection.h" | 23 #include "sql/connection.h" |
24 #include "sql/statement.h" | 24 #include "sql/statement.h" |
25 #include "sql/transaction.h" | 25 #include "sql/transaction.h" |
26 | 26 |
27 using autofill::PasswordForm; | 27 using autofill::PasswordForm; |
28 | 28 |
29 namespace password_manager { | 29 namespace password_manager { |
30 | 30 |
31 static const int kCurrentVersionNumber = 9; | 31 const int kCurrentVersionNumber = 9; |
32 static const int kCompatibleVersionNumber = 1; | 32 static const int kCompatibleVersionNumber = 1; |
33 | 33 |
34 Pickle SerializeVector(const std::vector<base::string16>& vec) { | 34 Pickle SerializeVector(const std::vector<base::string16>& vec) { |
35 Pickle p; | 35 Pickle p; |
36 for (size_t i = 0; i < vec.size(); ++i) { | 36 for (size_t i = 0; i < vec.size(); ++i) { |
37 p.WriteString16(vec[i]); | 37 p.WriteString16(vec[i]); |
38 } | 38 } |
39 return p; | 39 return p; |
40 } | 40 } |
41 | 41 |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 | 843 |
844 bool LoginDatabase::DeleteAndRecreateDatabaseFile() { | 844 bool LoginDatabase::DeleteAndRecreateDatabaseFile() { |
845 DCHECK(db_.is_open()); | 845 DCHECK(db_.is_open()); |
846 meta_table_.Reset(); | 846 meta_table_.Reset(); |
847 db_.Close(); | 847 db_.Close(); |
848 sql::Connection::Delete(db_path_); | 848 sql::Connection::Delete(db_path_); |
849 return Init(db_path_); | 849 return Init(db_path_); |
850 } | 850 } |
851 | 851 |
852 } // namespace password_manager | 852 } // namespace password_manager |
OLD | NEW |