| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sql/connection.h" | 5 #include "sql/connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 transaction_nesting_(0), | 121 transaction_nesting_(0), |
| 122 needs_rollback_(false), | 122 needs_rollback_(false), |
| 123 in_memory_(false), | 123 in_memory_(false), |
| 124 error_delegate_(NULL) { | 124 error_delegate_(NULL) { |
| 125 } | 125 } |
| 126 | 126 |
| 127 Connection::~Connection() { | 127 Connection::~Connection() { |
| 128 Close(); | 128 Close(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool Connection::Open(const FilePath& path) { | 131 bool Connection::Open(const base::FilePath& path) { |
| 132 #if defined(OS_WIN) | 132 #if defined(OS_WIN) |
| 133 return OpenInternal(WideToUTF8(path.value())); | 133 return OpenInternal(WideToUTF8(path.value())); |
| 134 #elif defined(OS_POSIX) | 134 #elif defined(OS_POSIX) |
| 135 return OpenInternal(path.value()); | 135 return OpenInternal(path.value()); |
| 136 #endif | 136 #endif |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool Connection::OpenInMemory() { | 139 bool Connection::OpenInMemory() { |
| 140 in_memory_ = true; | 140 in_memory_ = true; |
| 141 return OpenInternal(":memory:"); | 141 return OpenInternal(":memory:"); |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 | 680 |
| 681 if (error_delegate_.get()) | 681 if (error_delegate_.get()) |
| 682 return error_delegate_->OnError(err, this, stmt); | 682 return error_delegate_->OnError(err, this, stmt); |
| 683 | 683 |
| 684 // The default handling is to assert on debug and to ignore on release. | 684 // The default handling is to assert on debug and to ignore on release. |
| 685 DLOG(FATAL) << GetErrorMessage(); | 685 DLOG(FATAL) << GetErrorMessage(); |
| 686 return err; | 686 return err; |
| 687 } | 687 } |
| 688 | 688 |
| 689 } // namespace sql | 689 } // namespace sql |
| OLD | NEW |