Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: components/password_manager/core/browser/affiliation_database.cc

Issue 1991503002: [sql] sql::ScopedErrorIgnorer rename to sql::test::ScopedErrorExpecter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698