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

Side by Side Diff: Source/modules/webdatabase/DatabaseTracker.h

Issue 651503002: Clean up forward declarations in Source/modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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) 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 23 matching lines...) Expand all
34 #include "wtf/HashMap.h" 34 #include "wtf/HashMap.h"
35 #include "wtf/HashSet.h" 35 #include "wtf/HashSet.h"
36 #include "wtf/ThreadingPrimitives.h" 36 #include "wtf/ThreadingPrimitives.h"
37 #include "wtf/text/StringHash.h" 37 #include "wtf/text/StringHash.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class Database; 42 class Database;
43 class DatabaseContext; 43 class DatabaseContext;
44 class OriginLock;
45 class SecurityOrigin; 44 class SecurityOrigin;
46 45
47 class DatabaseTracker { 46 class DatabaseTracker {
48 WTF_MAKE_NONCOPYABLE(DatabaseTracker); WTF_MAKE_FAST_ALLOCATED; 47 WTF_MAKE_NONCOPYABLE(DatabaseTracker); WTF_MAKE_FAST_ALLOCATED;
49 public: 48 public:
50 static DatabaseTracker& tracker(); 49 static DatabaseTracker& tracker();
51 // This singleton will potentially be used from multiple worker threads and the page's context thread simultaneously. To keep this safe, it's 50 // This singleton will potentially be used from multiple worker threads and the page's context thread simultaneously. To keep this safe, it's
52 // currently using 4 locks. In order to avoid deadlock when taking multiple locks, you must take them in the correct order: 51 // currently using 4 locks. In order to avoid deadlock when taking multiple locks, you must take them in the correct order:
53 // m_databaseGuard before quotaManager if both locks are needed. 52 // m_databaseGuard before quotaManager if both locks are needed.
54 // m_openDatabaseMapGuard before quotaManager if both locks are needed. 53 // m_openDatabaseMapGuard before quotaManager if both locks are needed.
(...skipping 26 matching lines...) Expand all
81 Mutex m_openDatabaseMapGuard; 80 Mutex m_openDatabaseMapGuard;
82 // This map contains raw pointers to a garbage-collected class. We can't 81 // This map contains raw pointers to a garbage-collected class. We can't
83 // make this traceable because it is updated by multiple database threads. 82 // make this traceable because it is updated by multiple database threads.
84 GC_PLUGIN_IGNORE("crbug.com/417990") 83 GC_PLUGIN_IGNORE("crbug.com/417990")
85 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap; 84 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap;
86 }; 85 };
87 86
88 } // namespace blink 87 } // namespace blink
89 88
90 #endif // DatabaseTracker_h 89 #endif // DatabaseTracker_h
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/DatabaseThread.h ('k') | Source/modules/webdatabase/InspectorDatabaseAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698