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

Side by Side Diff: WebCore/platform/sql/SQLiteDatabase.cpp

Issue 596028: Make the DatabaseTracker thread-safe. (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/
Patch Set: '' Created 10 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
« no previous file with comments | « WebCore/platform/sql/SQLiteDatabase.h ('k') | WebCore/storage/Database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 30 matching lines...) Expand all
41 const int SQLResultOk = SQLITE_OK; 41 const int SQLResultOk = SQLITE_OK;
42 const int SQLResultRow = SQLITE_ROW; 42 const int SQLResultRow = SQLITE_ROW;
43 const int SQLResultSchema = SQLITE_SCHEMA; 43 const int SQLResultSchema = SQLITE_SCHEMA;
44 const int SQLResultFull = SQLITE_FULL; 44 const int SQLResultFull = SQLITE_FULL;
45 45
46 46
47 SQLiteDatabase::SQLiteDatabase() 47 SQLiteDatabase::SQLiteDatabase()
48 : m_db(0) 48 : m_db(0)
49 , m_pageSize(-1) 49 , m_pageSize(-1)
50 , m_transactionInProgress(false) 50 , m_transactionInProgress(false)
51 , m_sharable(false)
51 , m_openingThread(0) 52 , m_openingThread(0)
52 { 53 {
53 } 54 }
54 55
55 SQLiteDatabase::~SQLiteDatabase() 56 SQLiteDatabase::~SQLiteDatabase()
56 { 57 {
57 close(); 58 close();
58 } 59 }
59 60
60 bool SQLiteDatabase::open(const String& filename) 61 bool SQLiteDatabase::open(const String& filename)
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 { 361 {
361 m_lockingMutex.unlock(); 362 m_lockingMutex.unlock();
362 } 363 }
363 364
364 bool SQLiteDatabase::isAutoCommitOn() const 365 bool SQLiteDatabase::isAutoCommitOn() const
365 { 366 {
366 return sqlite3_get_autocommit(m_db); 367 return sqlite3_get_autocommit(m_db);
367 } 368 }
368 369
369 } // namespace WebCore 370 } // namespace WebCore
OLDNEW
« no previous file with comments | « WebCore/platform/sql/SQLiteDatabase.h ('k') | WebCore/storage/Database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698