| 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 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 11 #include "components/password_manager/core/browser/affiliation_utils.h" | 12 #include "components/password_manager/core/browser/affiliation_utils.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class FilePath; | 15 class FilePath; |
| 15 } // namespace base | 16 } // namespace base |
| 16 | 17 |
| 17 namespace sql { | 18 namespace sql { |
| 18 class Connection; | 19 class Connection; |
| 19 class Statement; | 20 class Statement; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 static void Delete(const base::FilePath& path); | 76 static void Delete(const base::FilePath& path); |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 // Creates any tables and indices that do not already exist in the database. | 79 // Creates any tables and indices that do not already exist in the database. |
| 79 bool CreateTablesAndIndicesIfNeeded(); | 80 bool CreateTablesAndIndicesIfNeeded(); |
| 80 | 81 |
| 81 // Called when SQLite encounters an error. | 82 // Called when SQLite encounters an error. |
| 82 void SQLErrorCallback(int error_number, sql::Statement* statement); | 83 void SQLErrorCallback(int error_number, sql::Statement* statement); |
| 83 | 84 |
| 84 // The SQL connection to the database. | 85 // The SQL connection to the database. |
| 85 scoped_ptr<sql::Connection> sql_connection_; | 86 std::unique_ptr<sql::Connection> sql_connection_; |
| 86 | 87 |
| 87 DISALLOW_COPY_AND_ASSIGN(AffiliationDatabase); | 88 DISALLOW_COPY_AND_ASSIGN(AffiliationDatabase); |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace password_manager | 91 } // namespace password_manager |
| 91 | 92 |
| 92 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ | 93 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_DATABASE_H_ |
| OLD | NEW |