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

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

Issue 3452030: FBTF: Moves code to the headers. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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.h ('k') | app/text_elider.h » ('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) 2010 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/connection.h" 5 #include "app/sql/connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "app/sql/statement.h" 9 #include "app/sql/statement.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "third_party/sqlite/sqlite3.h" 14 #include "third_party/sqlite/sqlite3.h"
15 15
16 namespace sql { 16 namespace sql {
17 17
18 bool StatementID::operator<(const StatementID& other) const { 18 bool StatementID::operator<(const StatementID& other) const {
19 if (number_ != other.number_) 19 if (number_ != other.number_)
20 return number_ < other.number_; 20 return number_ < other.number_;
21 return strcmp(str_, other.str_) < 0; 21 return strcmp(str_, other.str_) < 0;
22 } 22 }
23 23
24 ErrorDelegate::ErrorDelegate() {
25 }
26
27 ErrorDelegate::~ErrorDelegate() {
28 }
29
24 Connection::StatementRef::StatementRef() 30 Connection::StatementRef::StatementRef()
25 : connection_(NULL), 31 : connection_(NULL),
26 stmt_(NULL) { 32 stmt_(NULL) {
27 } 33 }
28 34
29 Connection::StatementRef::StatementRef(Connection* connection, 35 Connection::StatementRef::StatementRef(Connection* connection,
30 sqlite3_stmt* stmt) 36 sqlite3_stmt* stmt)
31 : connection_(connection), 37 : connection_(connection),
32 stmt_(stmt) { 38 stmt_(stmt) {
33 connection_->StatementRefCreated(this); 39 connection_->StatementRefCreated(this);
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 352
347 int Connection::OnSqliteError(int err, sql::Statement *stmt) { 353 int Connection::OnSqliteError(int err, sql::Statement *stmt) {
348 if (error_delegate_.get()) 354 if (error_delegate_.get())
349 return error_delegate_->OnError(err, this, stmt); 355 return error_delegate_->OnError(err, this, stmt);
350 // The default handling is to assert on debug and to ignore on release. 356 // The default handling is to assert on debug and to ignore on release.
351 NOTREACHED() << GetErrorMessage(); 357 NOTREACHED() << GetErrorMessage();
352 return err; 358 return err;
353 } 359 }
354 360
355 } // namespace sql 361 } // namespace sql
OLDNEW
« no previous file with comments | « app/sql/connection.h ('k') | app/text_elider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698