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

Unified Diff: webkit/support/simple_database_system.h

Issue 17476002: delete webkit/support/simple_xxx's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/simple_appcache_system.cc ('k') | webkit/support/simple_database_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/simple_database_system.h
diff --git a/webkit/support/simple_database_system.h b/webkit/support/simple_database_system.h
deleted file mode 100644
index 5498813e9ce6c67554a55f7d2d6ce5a9f69bf361..0000000000000000000000000000000000000000
--- a/webkit/support/simple_database_system.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_
-#define WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_
-
-#include "base/containers/hash_tables.h"
-#include "base/files/file_path.h"
-#include "base/files/scoped_temp_dir.h"
-#include "base/memory/ref_counted.h"
-#include "base/platform_file.h"
-#include "base/strings/string16.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread.h"
-#include "third_party/WebKit/public/web/WebDatabaseObserver.h"
-#include "webkit/browser/database/database_tracker.h"
-#include "webkit/common/database/database_connections.h"
-
-namespace base {
-class MessageLoopProxy;
-class WaitableEvent;
-}
-
-class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
- public WebKit::WebDatabaseObserver {
- public:
- static SimpleDatabaseSystem* GetInstance();
-
- SimpleDatabaseSystem();
- virtual ~SimpleDatabaseSystem();
-
- // WebDatabaseObserver implementation, these are called on the script
- // execution context thread on which the database is opened. This may be
- // the main thread or background WebWorker threads.
- virtual void databaseOpened(const WebKit::WebDatabase& database);
- virtual void databaseModified(const WebKit::WebDatabase& database);
- virtual void databaseClosed(const WebKit::WebDatabase& database);
-
- // SQLite VFS related methods, these are called on webcore's
- // background database threads via the WebKitPlatformSupport impl.
- base::PlatformFile OpenFile(const base::string16& vfs_file_name,
- int desired_flags);
- int DeleteFile(const base::string16& vfs_file_name, bool sync_dir);
- uint32 GetFileAttributes(const base::string16& vfs_file_name);
- int64 GetFileSize(const base::string16& vfs_file_name);
- int64 GetSpaceAvailable(const std::string& origin_identifier);
-
- // For use by testRunner, called on the main thread.
- void ClearAllDatabases();
- void SetDatabaseQuota(int64 quota);
-
- private:
- // Used by our WebDatabaseObserver impl, only called on the db_thread
- void DatabaseOpened(const std::string& origin_identifier,
- const base::string16& database_name,
- const base::string16& description,
- int64 estimated_size);
- void DatabaseModified(const std::string& origin_identifier,
- const base::string16& database_name);
- void DatabaseClosed(const std::string& origin_identifier,
- const base::string16& database_name);
-
- // DatabaseTracker::Observer implementation
- virtual void OnDatabaseSizeChanged(const std::string& origin_identifier,
- const base::string16& database_name,
- int64 database_size) OVERRIDE;
- virtual void OnDatabaseScheduledForDeletion(
- const std::string& origin_identifier,
- const base::string16& database_name) OVERRIDE;
-
- // Used by our public SQLite VFS methods, only called on the db_thread.
- void VfsOpenFile(const base::string16& vfs_file_name, int desired_flags,
- base::PlatformFile* result, base::WaitableEvent* done_event);
- void VfsDeleteFile(const base::string16& vfs_file_name, bool sync_dir,
- int* result, base::WaitableEvent* done_event);
- void VfsGetFileAttributes(const base::string16& vfs_file_name,
- uint32* result, base::WaitableEvent* done_event);
- void VfsGetFileSize(const base::string16& vfs_file_name,
- int64* result, base::WaitableEvent* done_event);
- void VfsGetSpaceAvailable(const std::string& origin_identifier,
- int64* result, base::WaitableEvent* done_event);
-
- base::FilePath GetFullFilePathForVfsFile(const base::string16& vfs_file_name);
-
- void ResetTracker();
- void ThreadCleanup(base::WaitableEvent* done_event);
-
- // Where the tracker database file and per origin database files reside.
- base::ScopedTempDir temp_dir_;
-
- // All access to the db_tracker (except for its construction) and
- // vfs operations are serialized on a background thread.
- base::Thread db_thread_;
- scoped_refptr<base::MessageLoopProxy> db_thread_proxy_;
- scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
- int64 quota_per_origin_;
-
- // Data members to support waiting for all connections to be closed.
- scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_;
-
- static SimpleDatabaseSystem* instance_;
-};
-
-#endif // WEBKIT_SUPPORT_SIMPLE_DATABASE_SYSTEM_H_
« no previous file with comments | « webkit/support/simple_appcache_system.cc ('k') | webkit/support/simple_database_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698