| Index: content/browser/indexed_db/webidbfactory_impl.h
|
| diff --git a/webkit/support/test_webidbfactory.h b/content/browser/indexed_db/webidbfactory_impl.h
|
| similarity index 50%
|
| copy from webkit/support/test_webidbfactory.h
|
| copy to content/browser/indexed_db/webidbfactory_impl.h
|
| index 2b6d3601057bb07099cbf33efc35e502acc07db5..abd501d34775f70365f3b921984b6c7594870a4c 100644
|
| --- a/webkit/support/test_webidbfactory.h
|
| +++ b/content/browser/indexed_db/webidbfactory_impl.h
|
| @@ -2,22 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef WEBKIT_SUPPORT_TEST_WEBIDBFACTORY_H_
|
| -#define WEBKIT_SUPPORT_TEST_WEBIDBFACTORY_H_
|
| +#ifndef CONTENT_BROWSER_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
|
| +#define CONTENT_BROWSER_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
|
|
|
| -#include "base/files/scoped_temp_dir.h"
|
| -#include "base/threading/thread_local.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBFactory.h"
|
|
|
| -// Wrap a WebKit::WebIDBFactory to rewrite the data directory to
|
| -// a scoped temp directory. In multiprocess Chromium this is rewritten
|
| -// to a real profile directory during IPC.
|
| -class TestWebIDBFactory : public WebKit::WebIDBFactory {
|
| +namespace content {
|
| +
|
| +class IndexedDBFactory;
|
| +
|
| +class WebIDBFactoryImpl : public WebKit::WebIDBFactory {
|
| public:
|
| - TestWebIDBFactory();
|
| - virtual ~TestWebIDBFactory();
|
| + WebIDBFactoryImpl();
|
| + virtual ~WebIDBFactoryImpl();
|
|
|
| - // WebIDBFactory methods:
|
| virtual void getDatabaseNames(WebKit::WebIDBCallbacks*,
|
| const WebKit::WebString& database_identifier,
|
| const WebKit::WebString& data_dir);
|
| @@ -34,19 +33,9 @@ class TestWebIDBFactory : public WebKit::WebIDBFactory {
|
| const WebKit::WebString& data_dir);
|
|
|
| private:
|
| - // Returns the WebIDBFactory implementation to use for the current thread.
|
| - WebKit::WebIDBFactory* GetFactory();
|
| -
|
| - // Returns the data directory to use.
|
| - WebKit::WebString GetDataDir() const;
|
| -
|
| - // We allocate a separate WebIDBFactory instance per thread since the
|
| - // implementation is not thread-safe. We also intentionally leak the
|
| - // factory instances to avoid shutdown races. TODO(darin): Can we
|
| - // avoid leaking these?
|
| - base::ThreadLocalPointer<WebKit::WebIDBFactory> factories_;
|
| -
|
| - base::ScopedTempDir indexed_db_dir_;
|
| + scoped_refptr<IndexedDBFactory> idb_factory_backend_;
|
| };
|
|
|
| -#endif // WEBKIT_SUPPORT_TEST_WEBIDBFACTORY_H_
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
|
|
|