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

Side by Side Diff: sql/connection.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « sql/connection.h ('k') | sql/connection_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) 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
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
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
OLDNEW
« no previous file with comments | « sql/connection.h ('k') | sql/connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698