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/affiliation_database.h" | 5 #include "components/password_manager/core/browser/affiliation_database.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 if (sql::IsErrorCatastrophic(error)) { | 252 if (sql::IsErrorCatastrophic(error)) { |
253 // Normally this will poison the database, causing any subsequent operations | 253 // Normally this will poison the database, causing any subsequent operations |
254 // to silently fail without any side effects. However, if RazeAndClose() is | 254 // to silently fail without any side effects. However, if RazeAndClose() is |
255 // called from the error callback in response to an error raised from within | 255 // called from the error callback in response to an error raised from within |
256 // sql::Connection::Open, opening the now-razed database will be retried. | 256 // sql::Connection::Open, opening the now-razed database will be retried. |
257 sql_connection_->RazeAndClose(); | 257 sql_connection_->RazeAndClose(); |
258 return; | 258 return; |
259 } | 259 } |
260 | 260 |
261 // The default handling is to assert on debug and to ignore on release. | 261 // The default handling is to assert on debug and to ignore on release. |
262 if (!sql::Connection::ShouldIgnoreSqliteError(error)) | 262 if (!sql::Connection::IsExpectedSqliteError(error)) |
263 DLOG(FATAL) << sql_connection_->GetErrorMessage(); | 263 DLOG(FATAL) << sql_connection_->GetErrorMessage(); |
264 } | 264 } |
265 | 265 |
266 } // namespace password_manager | 266 } // namespace password_manager |
OLD | NEW |