summaryrefslogtreecommitdiffstats
path: root/sql/connection.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 23:48:56 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-18 23:48:56 +0000
commit88cb62521e420fc7cafd5cb7fc3f368f3cc3dfd0 (patch)
tree2fb0125222ae225114d62ad6886d5ec061f71ae9 /sql/connection.h
parent16cf7ccb8efe62fdea69273a8410c049050ad241 (diff)
downloadchromium_src-88cb62521e420fc7cafd5cb7fc3f368f3cc3dfd0.zip
chromium_src-88cb62521e420fc7cafd5cb7fc3f368f3cc3dfd0.tar.gz
chromium_src-88cb62521e420fc7cafd5cb7fc3f368f3cc3dfd0.tar.bz2
Revert 147309 - Annotate calls to SQLite functions - they have to be executed on a thread allowing IO access.
Expand scope of ScopedAllowIO in the only place where SQLite functions are used on UI thread. Patch from Pavel Ivanov <paivanof@gmail.com> BUG=75232,52909,137961 TEST=no test fails with message "Function marked as IO-only was called from a thread that disallows IO!" Review URL: https://chromiumcodereview.appspot.com/10540155 Patch from Pavel Ivanov <paivanof@gmail.com>. TBR=shess@chromium.org Review URL: https://chromiumcodereview.appspot.com/10806025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147340 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/connection.h')
-rw-r--r--sql/connection.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/sql/connection.h b/sql/connection.h
index f4867b6..fba0326 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,7 +12,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "sql/sql_export.h"
@@ -321,14 +320,6 @@ class SQL_EXPORT Connection {
// sqlite3_open. The string can also be sqlite's special ":memory:" string.
bool OpenInternal(const std::string& file_name);
- // Check whether the current thread is allowed to make IO calls, but only
- // if database wasn't open in memory. Function is inlined to be a no-op in
- // official build.
- void AssertIOAllowed() {
- if (!in_memory_)
- base::ThreadRestrictions::AssertIOAllowed();
- }
-
// Internal helper for DoesTableExist and DoesIndexExist.
bool DoesTableOrIndexExist(const char* name, const char* type) const;
@@ -364,10 +355,6 @@ class SQL_EXPORT Connection {
// no longer be active.
void Close();
- // Check whether the current thread is allowed to make IO calls, but only
- // if database wasn't open in memory.
- void AssertIOAllowed() { if (connection_) connection_->AssertIOAllowed(); }
-
private:
friend class base::RefCounted<StatementRef>;
@@ -430,10 +417,6 @@ class SQL_EXPORT Connection {
// a rollback instead of a commit.
bool needs_rollback_;
- // True if database is open with OpenInMemory(), False if database is open
- // with Open().
- bool in_memory_;
-
// This object handles errors resulting from all forms of executing sqlite
// commands or statements. It can be null which means default handling.
scoped_refptr<ErrorDelegate> error_delegate_;