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

Side by Side Diff: app/sql/transaction.cc

Issue 3143037: Spelling correction: "nonexistant" -> "nonexistent". (Closed)
Patch Set: nitty Created 10 years, 4 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
« no previous file with comments | « app/sql/connection_unittest.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/sql/transaction.h" 5 #include "app/sql/transaction.h"
6 6
7 #include "app/sql/connection.h" 7 #include "app/sql/connection.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace sql { 10 namespace sql {
11 11
(...skipping 11 matching lines...) Expand all
23 if (is_open_) { 23 if (is_open_) {
24 NOTREACHED() << "Beginning a transaction twice!"; 24 NOTREACHED() << "Beginning a transaction twice!";
25 return false; 25 return false;
26 } 26 }
27 is_open_ = connection_->BeginTransaction(); 27 is_open_ = connection_->BeginTransaction();
28 return is_open_; 28 return is_open_;
29 } 29 }
30 30
31 void Transaction::Rollback() { 31 void Transaction::Rollback() {
32 if (!is_open_) { 32 if (!is_open_) {
33 NOTREACHED() << "Attempting to roll back a nonexistant transaction. " 33 NOTREACHED() << "Attempting to roll back a nonexistent transaction. "
34 << "Did you remember to call Begin() and check its return?"; 34 << "Did you remember to call Begin() and check its return?";
35 return; 35 return;
36 } 36 }
37 is_open_ = false; 37 is_open_ = false;
38 connection_->RollbackTransaction(); 38 connection_->RollbackTransaction();
39 } 39 }
40 40
41 bool Transaction::Commit() { 41 bool Transaction::Commit() {
42 if (!is_open_) { 42 if (!is_open_) {
43 NOTREACHED() << "Attempting to commit a nonexistant transaction. " 43 NOTREACHED() << "Attempting to commit a nonexistent transaction. "
44 << "Did you remember to call Begin() and check its return?"; 44 << "Did you remember to call Begin() and check its return?";
45 return false; 45 return false;
46 } 46 }
47 is_open_ = false; 47 is_open_ = false;
48 return connection_->CommitTransaction(); 48 return connection_->CommitTransaction();
49 } 49 }
50 50
51 } // namespace sql 51 } // namespace sql
OLDNEW
« no previous file with comments | « app/sql/connection_unittest.cc ('k') | base/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698