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/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 base::HistogramBase* histogram = | 235 base::HistogramBase* histogram = |
236 base::Histogram::FactoryGet( | 236 base::Histogram::FactoryGet( |
237 full_histogram_name, 1, 1000000, 50, | 237 full_histogram_name, 1, 1000000, 50, |
238 base::HistogramBase::kUmaTargetedHistogramFlag); | 238 base::HistogramBase::kUmaTargetedHistogramFlag); |
239 if (histogram) | 239 if (histogram) |
240 histogram->Add(sample); | 240 histogram->Add(sample); |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 #if defined(OS_WIN) | 244 #if defined(OS_WIN) |
245 return OpenInternal(WideToUTF8(path.value()), RETRY_ON_POISON); | 245 return OpenInternal(base::WideToUTF8(path.value()), RETRY_ON_POISON); |
246 #elif defined(OS_POSIX) | 246 #elif defined(OS_POSIX) |
247 return OpenInternal(path.value(), RETRY_ON_POISON); | 247 return OpenInternal(path.value(), RETRY_ON_POISON); |
248 #endif | 248 #endif |
249 } | 249 } |
250 | 250 |
251 bool Connection::OpenInMemory() { | 251 bool Connection::OpenInMemory() { |
252 in_memory_ = true; | 252 in_memory_ = true; |
253 return OpenInternal(":memory:", NO_RETRY); | 253 return OpenInternal(":memory:", NO_RETRY); |
254 } | 254 } |
255 | 255 |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 } | 1116 } |
1117 | 1117 |
1118 // Best effort to put things back as they were before. | 1118 // Best effort to put things back as they were before. |
1119 const char kNoWritableSchema[] = "PRAGMA writable_schema = OFF"; | 1119 const char kNoWritableSchema[] = "PRAGMA writable_schema = OFF"; |
1120 ignore_result(Execute(kNoWritableSchema)); | 1120 ignore_result(Execute(kNoWritableSchema)); |
1121 | 1121 |
1122 return ret; | 1122 return ret; |
1123 } | 1123 } |
1124 | 1124 |
1125 } // namespace sql | 1125 } // namespace sql |
OLD | NEW |