| OLD | NEW | 
|   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 "chrome/common/sqlite_compiled_statement.h" |   5 #include "chrome/common/sqlite_compiled_statement.h" | 
|   6  |   6  | 
|   7 #include "base/logging.h" |   7 #include "base/logging.h" | 
|   8 #include "base/stl_util-inl.h" |   8 #include "base/stl_util-inl.h" | 
|   9 #include "chrome/common/sqlite_utils.h" |   9 #include "chrome/common/sqlite_utils.h" | 
|  10 #include "third_party/sqlite/preprocessed/sqlite3.h" |  10 #include "third_party/sqlite/sqlite3.h" | 
|  11  |  11  | 
|  12 // SqliteStatementCache ------------------------------------------------------- |  12 // SqliteStatementCache ------------------------------------------------------- | 
|  13  |  13  | 
|  14 SqliteStatementCache::~SqliteStatementCache() { |  14 SqliteStatementCache::~SqliteStatementCache() { | 
|  15   STLDeleteContainerPairSecondPointers(statements_.begin(), statements_.end()); |  15   STLDeleteContainerPairSecondPointers(statements_.begin(), statements_.end()); | 
|  16   statements_.clear(); |  16   statements_.clear(); | 
|  17   db_ = NULL; |  17   db_ = NULL; | 
|  18 } |  18 } | 
|  19  |  19  | 
|  20 void SqliteStatementCache::set_db(sqlite3* db) { |  20 void SqliteStatementCache::set_db(sqlite3* db) { | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  76   return *statement_; |  76   return *statement_; | 
|  77 } |  77 } | 
|  78 SQLStatement* SqliteCompiledStatement::operator->() { |  78 SQLStatement* SqliteCompiledStatement::operator->() { | 
|  79   DCHECK(statement_) << "Should check is_valid() before using the statement."; |  79   DCHECK(statement_) << "Should check is_valid() before using the statement."; | 
|  80   return statement_; |  80   return statement_; | 
|  81 } |  81 } | 
|  82 SQLStatement* SqliteCompiledStatement::statement() { |  82 SQLStatement* SqliteCompiledStatement::statement() { | 
|  83   DCHECK(statement_) << "Should check is_valid() before using the statement."; |  83   DCHECK(statement_) << "Should check is_valid() before using the statement."; | 
|  84   return statement_; |  84   return statement_; | 
|  85 } |  85 } | 
| OLD | NEW |