From e25e80ea106113bae505ee6b776fb97be1117411 Mon Sep 17 00:00:00 2001 From: "aa@google.com" Date: Fri, 5 Sep 2008 19:02:24 +0000 Subject: Rollback revisions 1785-1786 due to purify regression. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1795 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/port/page/inspector/InspectorController.cpp | 21 ------ webkit/port/storage/DatabaseTracker.cpp | 88 ---------------------- webkit/port/storage/OriginQuotaManager.cpp | 59 --------------- 3 files changed, 168 deletions(-) delete mode 100644 webkit/port/storage/DatabaseTracker.cpp delete mode 100644 webkit/port/storage/OriginQuotaManager.cpp (limited to 'webkit/port') diff --git a/webkit/port/page/inspector/InspectorController.cpp b/webkit/port/page/inspector/InspectorController.cpp index 35c052f..a34ad33 100644 --- a/webkit/port/page/inspector/InspectorController.cpp +++ b/webkit/port/page/inspector/InspectorController.cpp @@ -89,15 +89,10 @@ #endif #include -// TODO(aa): Implement database inspection and remove this macro. -#define ENABLE_DATABASE_INSPECTION 0 - #if ENABLE(DATABASE) #include "Database.h" -#if ENABLE_DATABASE_INSPECTION #include "JSDatabase.h" #endif -#endif #if USE(JAVASCRIPTCORE_BINDINGS) using namespace KJS; @@ -482,7 +477,6 @@ protected: #if ENABLE(DATABASE) struct InspectorDatabaseResource : public RefCounted { -#if ENABLE_DATABASE_INSPECTION static PassRefPtr create(Database* database, const String& domain, const String& name, const String& version) { // Apple changed the default refcount to 1: http://trac.webkit.org/changeset/30406 @@ -524,7 +518,6 @@ private: , scriptObject(0) { } -#endif }; #endif @@ -915,7 +908,6 @@ void InspectorController::search(Node* node, const String& target) { #endif #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { InspectorController* controller = reinterpret_cast(JSObjectGetPrivate(thisObject)); @@ -970,7 +962,6 @@ static JSValueRef databaseTableNames(JSContextRef ctx, JSObjectRef /*function*/, return result; } #endif -#endif #if USE(JAVASCRIPTCORE_BINDINGS) static JSValueRef inspectedWindow(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/) @@ -1456,10 +1447,8 @@ void InspectorController::windowScriptObjectAvailable() { "detach", detach, kJSPropertyAttributeNone }, { "search", search, kJSPropertyAttributeNone }, #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION { "databaseTableNames", databaseTableNames, kJSPropertyAttributeNone }, #endif -#endif { "inspectedWindow", inspectedWindow, kJSPropertyAttributeNone }, { "localizedStringsURL", localizedStrings, kJSPropertyAttributeNone }, { "platform", platform, kJSPropertyAttributeNone }, @@ -2204,12 +2193,10 @@ void InspectorController::populateScriptObjects() addScriptConsoleMessage(m_consoleMessages[i]); #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION DatabaseResourcesSet::iterator databasesEnd = m_databaseResources.end(); for (DatabaseResourcesSet::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it) addDatabaseScriptResource((*it).get()); #endif -#endif } #elif USE(V8_BINDING) void InspectorController::populateScriptObjects() @@ -2225,7 +2212,6 @@ void InspectorController::populateScriptObjects() #endif #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION JSObjectRef InspectorController::addDatabaseScriptResource(InspectorDatabaseResource* resource) { ASSERT_ARG(resource, resource); @@ -2320,7 +2306,6 @@ void InspectorController::removeDatabaseScriptResource(InspectorDatabaseResource HANDLE_EXCEPTION(exception); } #endif -#endif #if USE(JAVASCRIPTCORE_BINDINGS) void InspectorController::addScriptConsoleMessage(const ConsoleMessage* message) @@ -2449,14 +2434,12 @@ void InspectorController::resetScriptObjects() } #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION DatabaseResourcesSet::iterator databasesEnd = m_databaseResources.end(); for (DatabaseResourcesSet::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it) { InspectorDatabaseResource* resource = (*it).get(); resource->setScriptObject(0, 0); } #endif -#endif #if USE(JAVASCRIPTCORE_BINDINGS) callSimpleFunction(m_scriptContext, m_scriptObject, "reset"); @@ -2503,10 +2486,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader) m_consoleMessages.clear(); #if ENABLE(DATABASE) -#if ENABLE_DATABASE_INSPECTION m_databaseResources.clear(); #endif -#endif if (windowVisible()) { resetScriptObjects(); @@ -2748,7 +2729,6 @@ void InspectorController::resourceRetrievedByXMLHttpRequest(unsigned long identi #if ENABLE(DATABASE) void InspectorController::didOpenDatabase(Database* database, const String& domain, const String& name, const String& version) { -#if ENABLE_DATABASE_INSPECTION if (!enabled()) return; @@ -2758,7 +2738,6 @@ void InspectorController::didOpenDatabase(Database* database, const String& doma if (windowVisible()) addDatabaseScriptResource(resource.get()); -#endif } #endif diff --git a/webkit/port/storage/DatabaseTracker.cpp b/webkit/port/storage/DatabaseTracker.cpp deleted file mode 100644 index ff059cd..0000000 --- a/webkit/port/storage/DatabaseTracker.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 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. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DatabaseTracker.h" -#include "OriginQuotaManager.h" - -using namespace std; - -namespace WebCore { - -OriginQuotaManager& DatabaseTracker::originQuotaManager() -{ - return *m_quotaManager; -} - -DatabaseTracker& DatabaseTracker::tracker() -{ - static DatabaseTracker tracker; - return tracker; -} - -DatabaseTracker::DatabaseTracker() - : m_client(0) - , m_proposedDatabase(0) -#ifndef NDEBUG - , m_thread(currentThread()) -#endif -{ -} - -bool DatabaseTracker::canEstablishDatabase(Document* document, const String& name, const String& displayName, unsigned long estimatedSize) -{ - return true; -} - -String DatabaseTracker::fullPathForDatabase(SecurityOrigin* origin, const String& name, bool createIfNotExists) -{ - return ""; -} - -void DatabaseTracker::setDatabaseDetails(SecurityOrigin* origin, const String& name, const String& displayName, unsigned long estimatedSize) -{ -} - -void DatabaseTracker::addOpenDatabase(Database* database) -{ -} - -void DatabaseTracker::removeOpenDatabase(Database* database) -{ -} - -unsigned long long DatabaseTracker::quotaForOrigin(SecurityOrigin* origin) -{ - return 0; -} - -void DatabaseTracker::scheduleNotifyDatabaseChanged(SecurityOrigin* origin, const String& name) -{ -} - -} diff --git a/webkit/port/storage/OriginQuotaManager.cpp b/webkit/port/storage/OriginQuotaManager.cpp deleted file mode 100644 index 09af45d..0000000 --- a/webkit/port/storage/OriginQuotaManager.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 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. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "config.h" -#include "OriginQuotaManager.h" - -#include "Database.h" -#include "OriginUsageRecord.h" - -namespace WebCore { - -OriginQuotaManager::OriginQuotaManager() -{ -} - -void OriginQuotaManager::lock() -{ - m_usageRecordGuard.lock(); -} - -void OriginQuotaManager::unlock() -{ - m_usageRecordGuard.unlock(); -} - -void OriginQuotaManager::markDatabase(Database* database) -{ -} - -unsigned long long OriginQuotaManager::diskUsage(SecurityOrigin* origin) const -{ - return 0; -} - -} -- cgit v1.1