OLD | NEW |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // notificationMutex() is currently independent of the other locks. | 55 // notificationMutex() is currently independent of the other locks. |
56 | 56 |
57 bool canEstablishDatabase(DatabaseContext*, const String& name, const String
& displayName, unsigned long estimatedSize, DatabaseError&); | 57 bool canEstablishDatabase(DatabaseContext*, const String& name, const String
& displayName, unsigned long estimatedSize, DatabaseError&); |
58 String fullPathForDatabase(SecurityOrigin*, const String& name, bool createI
fDoesNotExist = true); | 58 String fullPathForDatabase(SecurityOrigin*, const String& name, bool createI
fDoesNotExist = true); |
59 | 59 |
60 void addOpenDatabase(DatabaseBackendBase*); | 60 void addOpenDatabase(DatabaseBackendBase*); |
61 void removeOpenDatabase(DatabaseBackendBase*); | 61 void removeOpenDatabase(DatabaseBackendBase*); |
62 | 62 |
63 unsigned long long getMaxSizeForDatabase(const DatabaseBackendBase*); | 63 unsigned long long getMaxSizeForDatabase(const DatabaseBackendBase*); |
64 | 64 |
65 void interruptAllDatabasesForContext(const DatabaseContext*); | |
66 void closeDatabasesImmediately(const String& originIdentifier, const String&
name); | 65 void closeDatabasesImmediately(const String& originIdentifier, const String&
name); |
67 | 66 |
68 void prepareToOpenDatabase(DatabaseBackendBase*); | 67 void prepareToOpenDatabase(DatabaseBackendBase*); |
69 void failedToOpenDatabase(DatabaseBackendBase*); | 68 void failedToOpenDatabase(DatabaseBackendBase*); |
70 | 69 |
71 private: | 70 private: |
72 typedef HashSet<DatabaseBackendBase*> DatabaseSet; | 71 typedef HashSet<DatabaseBackendBase*> DatabaseSet; |
73 typedef HashMap<String, DatabaseSet*> DatabaseNameMap; | 72 typedef HashMap<String, DatabaseSet*> DatabaseNameMap; |
74 typedef HashMap<String, DatabaseNameMap*> DatabaseOriginMap; | 73 typedef HashMap<String, DatabaseNameMap*> DatabaseOriginMap; |
75 class CloseOneDatabaseImmediatelyTask; | 74 class CloseOneDatabaseImmediatelyTask; |
76 | 75 |
77 DatabaseTracker(); | 76 DatabaseTracker(); |
78 | 77 |
79 void closeOneDatabaseImmediately(const String& originIdentifier, const Strin
g& name, DatabaseBackendBase*); | 78 void closeOneDatabaseImmediately(const String& originIdentifier, const Strin
g& name, DatabaseBackendBase*); |
80 | 79 |
81 Mutex m_openDatabaseMapGuard; | 80 Mutex m_openDatabaseMapGuard; |
82 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap; | 81 mutable OwnPtr<DatabaseOriginMap> m_openDatabaseMap; |
83 }; | 82 }; |
84 | 83 |
85 } // namespace blink | 84 } // namespace blink |
86 | 85 |
87 #endif // DatabaseTracker_h | 86 #endif // DatabaseTracker_h |
OLD | NEW |