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

Side by Side Diff: Source/modules/indexeddb/IDBTransaction.h

Issue 426063010: IndexedDB: Fixed threading bugs with use of AtomicStrings. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Commented names and removed bison build rule Created 6 years, 4 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) 2010 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 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 , public EventTargetWithInlineData 53 , public EventTargetWithInlineData
54 , public ActiveDOMObject { 54 , public ActiveDOMObject {
55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I DBTransaction>); 55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<I DBTransaction>);
56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction); 56 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction);
57 public: 57 public:
58 static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<Strin g>& objectStoreNames, blink::WebIDBTransactionMode, IDBDatabase*); 58 static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<Strin g>& objectStoreNames, blink::WebIDBTransactionMode, IDBDatabase*);
59 static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBO penDBRequest*, const IDBDatabaseMetadata& previousMetadata); 59 static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBO penDBRequest*, const IDBDatabaseMetadata& previousMetadata);
60 virtual ~IDBTransaction(); 60 virtual ~IDBTransaction();
61 virtual void trace(Visitor*) OVERRIDE; 61 virtual void trace(Visitor*) OVERRIDE;
62 62
63 static const AtomicString& modeReadOnly();
64 static const AtomicString& modeReadWrite();
65 static const AtomicString& modeVersionChange();
66
67 static blink::WebIDBTransactionMode stringToMode(const String&, ExceptionSta te&); 63 static blink::WebIDBTransactionMode stringToMode(const String&, ExceptionSta te&);
68 static const AtomicString& modeToString(blink::WebIDBTransactionMode);
69 64
70 // When the connection is closed backend will be 0. 65 // When the connection is closed backend will be 0.
71 blink::WebIDBDatabase* backendDB() const; 66 blink::WebIDBDatabase* backendDB() const;
72 67
73 int64_t id() const { return m_id; } 68 int64_t id() const { return m_id; }
74 bool isActive() const { return m_state == Active; } 69 bool isActive() const { return m_state == Active; }
75 bool isFinished() const { return m_state == Finished; } 70 bool isFinished() const { return m_state == Finished; }
76 bool isFinishing() const { return m_state == Finishing; } 71 bool isFinishing() const { return m_state == Finishing; }
77 bool isReadOnly() const { return m_mode == blink::WebIDBTransactionModeReadO nly; } 72 bool isReadOnly() const { return m_mode == blink::WebIDBTransactionModeReadO nly; }
78 bool isVersionChange() const { return m_mode == blink::WebIDBTransactionMode VersionChange; } 73 bool isVersionChange() const { return m_mode == blink::WebIDBTransactionMode VersionChange; }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 IDBObjectStoreSet m_deletedObjectStores; 135 IDBObjectStoreSet m_deletedObjectStores;
141 136
142 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec tStoreMetadataMap; 137 typedef HeapHashMap<Member<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjec tStoreMetadataMap;
143 IDBObjectStoreMetadataMap m_objectStoreCleanupMap; 138 IDBObjectStoreMetadataMap m_objectStoreCleanupMap;
144 IDBDatabaseMetadata m_previousMetadata; 139 IDBDatabaseMetadata m_previousMetadata;
145 }; 140 };
146 141
147 } // namespace blink 142 } // namespace blink
148 143
149 #endif // IDBTransaction_h 144 #endif // IDBTransaction_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698