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

Side by Side Diff: Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp

Issue 8152004: Merge 96554 - A little more WebSQLDatabase thread safety. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer 11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the 12 * in the documentation and/or other materials provided with the
(...skipping 27 matching lines...) Expand all
40 #include "ScriptExecutionContext.h" 40 #include "ScriptExecutionContext.h"
41 #include "SecurityOrigin.h" 41 #include "SecurityOrigin.h"
42 #include "SecurityOriginHash.h" 42 #include "SecurityOriginHash.h"
43 #include "SQLiteFileSystem.h" 43 #include "SQLiteFileSystem.h"
44 #include <wtf/StdLibExtras.h> 44 #include <wtf/StdLibExtras.h>
45 45
46 namespace WebCore { 46 namespace WebCore {
47 47
48 DatabaseTracker& DatabaseTracker::tracker() 48 DatabaseTracker& DatabaseTracker::tracker()
49 { 49 {
50 DEFINE_STATIC_LOCAL(DatabaseTracker, tracker, ("")); 50 AtomicallyInitializedStatic(DatabaseTracker&, tracker = *new DatabaseTracker (""));
51 return tracker; 51 return tracker;
52 } 52 }
53 53
54 DatabaseTracker::DatabaseTracker(const String&) 54 DatabaseTracker::DatabaseTracker(const String&)
55 { 55 {
56 SQLiteFileSystem::registerSQLiteVFS(); 56 SQLiteFileSystem::registerSQLiteVFS();
57 } 57 }
58 58
59 bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext* scriptExecuti onContext, const String& name, const String& displayName, unsigned long estimate dSize) 59 bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext* scriptExecuti onContext, const String& name, const String& displayName, unsigned long estimate dSize)
60 { 60 {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesEndIt = openD atabases.end(); 214 Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesEndIt = openD atabases.end();
215 for (Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesIt = ope nDatabases.begin(); openDatabasesIt != openDatabasesEndIt; ++openDatabasesIt) 215 for (Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesIt = ope nDatabases.begin(); openDatabasesIt != openDatabasesEndIt; ++openDatabasesIt)
216 (*openDatabasesIt)->interrupt(); 216 (*openDatabasesIt)->interrupt();
217 } 217 }
218 218
219 } 219 }
220 220
221 #endif // ENABLE(DATABASE) 221 #endif // ENABLE(DATABASE)
OLDNEW
« no previous file with comments | « Source/WebCore/storage/AbstractDatabase.cpp ('k') | Source/WebCore/storage/chromium/QuotaTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698