Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h |
| diff --git a/third_party/WebKit/Source/platform/testing/TreeTestHelpers.cpp b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h |
| similarity index 77% |
| copy from third_party/WebKit/Source/platform/testing/TreeTestHelpers.cpp |
| copy to third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h |
| index 3bff6c06ffc53f0e8ea7b6f088159b96d9132c97..0e1ba8e44204bee9e5c4494e9f76aac36ecc8a1b 100644 |
| --- a/third_party/WebKit/Source/platform/testing/TreeTestHelpers.cpp |
| +++ b/third_party/WebKit/public/platform/modules/indexeddb/WebIDBObserver.h |
| @@ -6,7 +6,7 @@ |
| * are met: |
| * |
| * 1. Redistributions of source code must retain the above copyright |
| - * notice, this list of conditions and the following disclaimer. |
| + * notice, this list of conditions and the following disclaimer.o |
| * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. |
| @@ -23,23 +23,28 @@ |
| * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
|
dmurph
2016/06/23 21:53:05
Please use the new copyright header
https://www.ch
palakj1
2016/06/24 00:03:01
Done.
|
| -#include "platform/testing/TreeTestHelpers.h" |
| +#ifndef WebIDBObserver_h |
| +#define WebIDBObserver_h |
| -#include <cstdlib> |
| +#include "public/platform/WebPrivatePtr.h" |
| namespace blink { |
| -namespace TreeTestHelpers { |
| -void initRandom(const int32_t seed) |
| -{ |
| - srand(seed); |
| -} |
| +class IDBObserver; |
| -int32_t nextRandom(const int32_t maximumValue) |
| -{ |
| - // rand_r is not available on Windows |
| - return rand() % maximumValue; |
| -} |
| +class WebIDBObserver { |
| +public: |
| + BLINK_EXPORT virtual ~WebIDBObserver(); |
| + WebIDBObserver() {} |
| + |
| +#if INSIDE_BLINK |
| + WebIDBObserver(IDBObserver*); |
| +#endif |
| + |
| +private: |
| + WebPrivatePtr<IDBObserver, WebPrivatePtrDestructionCrossThread> m_observer; |
| +}; |
| -} // namespace TreeTestHelpers |
| } // namespace blink |
| + |
| +#endif // WebIDBObserver_h |