Title: [114160] trunk/Source
Revision
114160
Author
micha...@google.com
Date
2012-04-13 12:33:55 -0700 (Fri, 13 Apr 2012)

Log Message

[chromium] Now that the chromium port is using a different dom_storage backend
library in its main browser process, there are a handful of files that should no
longer be included in the build, and a few files than should be deleted
outright, and the webkit api should be modified to reflect the new (and smaller)
contract between the embedder and webkit/webcore.
https://bugs.webkit.org/show_bug.cgi?id=83807

Reviewed by Adam Barth.

Source/WebCore: 

No new tests, existing tests apply.

* WebCore.gyp/WebCore.gyp: Exclude several files from the WebCore/storage directory.
* storage/StorageEventDispatcher.h: Delete a stale comment.

Source/WebKit/chromium: 

* WebKit.gyp: Delete a few files.
* public/WebStorageNamespace.h:  Remove some unused data members and methods, and annotate close() as deprecated.
* public/platform/WebKitPlatformSupport.h: Annotate a method as deprecated.
* src/StorageAreaProxy.cpp: Remove the include of a deleted file.
* src/StorageEventDispatcherChromium.cpp: Removed.
* src/StorageEventDispatcherImpl.cpp: Added a FIXME comment for upcoming work.
* src/StorageNamespaceProxy.cpp: Modified to no longer call out to the embedder thru the deprecated close() method.
* src/StorageNamespaceProxy.h: Moved some blank lines around.
* src/WebStorageAreaImpl.cpp: Removed.
* src/WebStorageAreaImpl.h: Removed.
* src/WebStorageEventDispatcherImpl.cpp: Cleaned up some cruft.
* src/WebStorageNamespaceImpl.cpp: Removed.
* src/WebStorageNamespaceImpl.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114159 => 114160)


--- trunk/Source/WebCore/ChangeLog	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebCore/ChangeLog	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,3 +1,19 @@
+2012-04-12  Michael Nordman  <micha...@google.com>
+
+        [chromium] Now that the chromium port is using a different dom_storage backend
+        library in its main browser process, there are a handful of files that should no
+        longer be included in the build, and a few files than should be deleted
+        outright, and the webkit api should be modified to reflect the new (and smaller)
+        contract between the embedder and webkit/webcore.
+        https://bugs.webkit.org/show_bug.cgi?id=83807
+
+        Reviewed by Adam Barth.
+
+        No new tests, existing tests apply.
+
+        * WebCore.gyp/WebCore.gyp: Exclude several files from the WebCore/storage directory.
+        * storage/StorageEventDispatcher.h: Delete a stale comment.
+
 2012-04-13  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r114140.

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (114159 => 114160)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1847,8 +1847,17 @@
         ['exclude', 'plugins/PluginStream\\.cpp$'],
         ['exclude', 'plugins/PluginView\\.cpp$'],
         ['exclude', 'plugins/npapi\\.cpp$'],
-        ['exclude', 'storage/StorageEventDispatcher\\.cpp$'],
+        ['exclude', 'storage/StorageAreaImpl\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageAreaSync\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageEventDispatcher\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageMap\\.(cpp|h)$'],
         ['exclude', 'storage/StorageNamespace\\.cpp$'],
+        ['exclude', 'storage/StorageNamespaceImpl\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageSyncManager\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageTask\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageThread\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageTracker\\.(cpp|h)$'],
+        ['exclude', 'storage/StorageTrackerClient\\.h$'],
         ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
 
         ['include', 'loader/appcache/ApplicationCacheHost\.h$'],

Modified: trunk/Source/WebCore/storage/StorageEventDispatcher.h (114159 => 114160)


--- trunk/Source/WebCore/storage/StorageEventDispatcher.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebCore/storage/StorageEventDispatcher.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -35,7 +35,6 @@
 
 namespace WebCore {
 
-    // This is in its own class since Chromium must override it.
     class StorageEventDispatcher {
     public:
         static void dispatch(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame);

Modified: trunk/Source/WebKit/chromium/ChangeLog (114159 => 114160)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,3 +1,28 @@
+2012-04-12  Michael Nordman  <micha...@google.com>
+
+        [chromium] Now that the chromium port is using a different dom_storage backend
+        library in its main browser process, there are a handful of files that should no
+        longer be included in the build, and a few files than should be deleted
+        outright, and the webkit api should be modified to reflect the new (and smaller)
+        contract between the embedder and webkit/webcore.
+        https://bugs.webkit.org/show_bug.cgi?id=83807
+
+        Reviewed by Adam Barth.
+
+        * WebKit.gyp: Delete a few files.
+        * public/WebStorageNamespace.h:  Remove some unused data members and methods, and annotate close() as deprecated.
+        * public/platform/WebKitPlatformSupport.h: Annotate a method as deprecated.
+        * src/StorageAreaProxy.cpp: Remove the include of a deleted file.
+        * src/StorageEventDispatcherChromium.cpp: Removed.
+        * src/StorageEventDispatcherImpl.cpp: Added a FIXME comment for upcoming work.
+        * src/StorageNamespaceProxy.cpp: Modified to no longer call out to the embedder thru the deprecated close() method.
+        * src/StorageNamespaceProxy.h: Moved some blank lines around.
+        * src/WebStorageAreaImpl.cpp: Removed.
+        * src/WebStorageAreaImpl.h: Removed.
+        * src/WebStorageEventDispatcherImpl.cpp: Cleaned up some cruft.
+        * src/WebStorageNamespaceImpl.cpp: Removed.
+        * src/WebStorageNamespaceImpl.h: Removed.
+
 2012-04-13  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r114140.

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (114159 => 114160)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -474,7 +474,6 @@
                 'src/SpeechRecognitionClientProxy.h',
                 'src/StorageAreaProxy.cpp',
                 'src/StorageAreaProxy.h',
-                'src/StorageEventDispatcherChromium.cpp',
                 'src/StorageEventDispatcherImpl.cpp',
                 'src/StorageEventDispatcherImpl.h',
                 'src/StorageInfoChromium.cpp',
@@ -657,12 +656,8 @@
                 'src/WebSpeechInputResult.cpp',
                 'src/WebSpeechRecognitionHandle.cpp',
                 'src/WebSpeechRecognitionResult.cpp',
-                'src/WebStorageAreaImpl.cpp',
-                'src/WebStorageAreaImpl.h',
                 'src/WebStorageEventDispatcherImpl.cpp',
                 'src/WebStorageEventDispatcherImpl.h',
-                'src/WebStorageNamespaceImpl.cpp',
-                'src/WebStorageNamespaceImpl.h',
                 'src/WebStorageQuotaCallbacksImpl.cpp',
                 'src/WebStorageQuotaCallbacksImpl.h',
                 'src/WebTextRun.cpp',

Modified: trunk/Source/WebKit/chromium/public/WebStorageNamespace.h (114159 => 114160)


--- trunk/Source/WebKit/chromium/public/WebStorageNamespace.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/public/WebStorageNamespace.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -43,23 +43,6 @@
 // StorageNamespace to represent LocalStorage for the entire browser.
 class WebStorageNamespace {
 public:
-    // Create a new WebStorageNamespace. LocalStorageNamespaces require a path to specify
-    // where the SQLite databases that make LocalStorage data persistent are located.
-    // If path is empty, data will not persist. You should call delete on the returned
-    // object when you're finished.
-    WEBKIT_EXPORT static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
-    WEBKIT_EXPORT static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
-
-    // The quota for each storage area.  Suggested by the spec.
-    static const unsigned m_localStorageQuota = 5 * 1024 * 1024;
-
-    // Since SessionStorage memory is allocated in the browser process, we place a
-    // per-origin quota on it.  Like LocalStorage there are known attacks against
-    // this, so it's more of a sanity check than a real security measure.
-    static const unsigned m_sessionStorageQuota = 5 * 1024 * 1024;
-
-    static const unsigned noQuota = UINT_MAX;
-
     virtual ~WebStorageNamespace() { }
 
     // Create a new WebStorageArea object. Two subsequent calls with the same origin
@@ -70,9 +53,8 @@
     // Copy a StorageNamespace. This only makes sense in the case of SessionStorage.
     virtual WebStorageNamespace* copy() = 0;
 
-    // Shutdown the StorageNamespace. Write all StorageArea's to disk and disallow new
-    // write activity.
-    virtual void close() = 0;
+    // DEPRECATED
+    virtual void close() { }
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (114159 => 114160)


--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -92,7 +92,7 @@
     // Return a LocalStorage namespace that corresponds to the following path.
     virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
 
-    // Called when storage events fire.
+    // DEPRECATED
     virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
                                       const WebString& newValue, const WebString& origin,
                                       const WebURL& url, bool isLocalStorage) { }

Modified: trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -35,7 +35,6 @@
 #include "Page.h"
 #include "PageGroup.h"
 #include "SecurityOrigin.h"
-#include "StorageAreaImpl.h"
 #include "StorageEvent.h"
 
 #include "WebFrameImpl.h"
@@ -140,6 +139,8 @@
         }
 
         for (unsigned i = 0; i < frames.size(); ++i) {
+            // FIXME: maybe only raise if the window has an onstorage listener
+            // attached to avoid creating the Storage instance.
             ExceptionCode ec = 0;
             Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
             if (!ec)
@@ -157,6 +158,8 @@
         }
 
         for (unsigned i = 0; i < frames.size(); ++i) {
+            // FIXME: maybe only raise if the window has an onstorage listener
+            // attached to avoid creating the Storage instance.
             ExceptionCode ec = 0;
             Storage* storage = frames[i]->domWindow()->localStorage(ec);
             if (!ec)

Deleted: trunk/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/StorageEventDispatcherChromium.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2009 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "StorageEventDispatcher.h"
-
-#include "SecurityOrigin.h"
-#include "StorageArea.h"
-
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-
-namespace WebCore {
-
-void StorageEventDispatcher::dispatch(const String& key, const String& oldValue,
-                                      const String& newValue, StorageType storageType,
-                                      SecurityOrigin* origin, Frame* sourceFrame)
-{
-    ASSERT(!sourceFrame);  // Sad, but true.
-    WebKit::webKitPlatformSupport()->dispatchStorageEvent(key, oldValue, newValue, origin->toString(), WebKit::WebURL(), storageType == LocalStorage);
-}
-
-} // namespace WebCore

Modified: trunk/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -49,6 +49,7 @@
     ASSERT(m_pageGroup);
 }
 
+// FIXME: add a sourceStorageArea parameter to this
 void StorageEventDispatcherImpl::dispatchStorageEvent(const String& key, const String& oldValue,
                                                       const String& newValue, SecurityOrigin* securityOrigin,
                                                       const KURL& url, StorageType storageType)
@@ -65,6 +66,7 @@
     HashSet<Page*>::const_iterator end = pages.end();
     for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
         for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+            // FIXME: identify the srcFrame while in this loop too and exclude it from 'frames'.
             if (frame->document()->securityOrigin()->equal(securityOrigin))
                 frames.append(frame);
         }

Modified: trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -82,7 +82,7 @@
 
 void StorageNamespaceProxy::close()
 {
-    m_storageNamespace->close();
+    // N/A to the chromium port.
 }
 
 void StorageNamespaceProxy::clearOriginForDeletion(SecurityOrigin* origin)

Modified: trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/StorageNamespaceProxy.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -39,11 +39,10 @@
     virtual ~StorageNamespaceProxy();
     virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
     virtual PassRefPtr<StorageNamespace> copy();
+
     virtual void close();
-    
     virtual void clearOriginForDeletion(SecurityOrigin*);
     virtual void clearAllOriginsForDeletion();
-    
     virtual void sync();
 
 private:

Deleted: trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2009 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "WebStorageAreaImpl.h"
-
-#include "ExceptionCode.h"
-
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-
-namespace WebKit {
-
-const WebURL* WebStorageAreaImpl::storageEventURL = 0;
-
-WebStorageAreaImpl::WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea)
-    : m_storageArea(storageArea)
-{
-}
-
-WebStorageAreaImpl::~WebStorageAreaImpl()
-{
-}
-
-unsigned WebStorageAreaImpl::length()
-{
-    return m_storageArea->length(0);
-}
-
-WebString WebStorageAreaImpl::key(unsigned index)
-{
-    return m_storageArea->key(index, 0);
-}
-
-WebString WebStorageAreaImpl::getItem(const WebString& key)
-{
-    return m_storageArea->getItem(key, 0);
-}
-
-void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue)
-{
-    int exceptionCode = 0;
-
-    ScopedStorageEventURL scope(url);
-    oldValue = m_storageArea->setItem(key, value, exceptionCode, 0);
-
-    if (exceptionCode) {
-        ASSERT(exceptionCode == WebCore::QUOTA_EXCEEDED_ERR);
-        result = ResultBlockedByQuota;
-    } else
-        result = ResultOK;
-}
-
-void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url, WebString& oldValue)
-{
-    ScopedStorageEventURL scope(url);
-    oldValue = m_storageArea->removeItem(key, 0);
-}
-
-void WebStorageAreaImpl::clear(const WebURL& url, bool& somethingCleared)
-{
-    ScopedStorageEventURL scope(url);
-    somethingCleared = m_storageArea->clear(0);
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.h (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/WebStorageAreaImpl.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2009 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-#ifndef WebStorageAreaImpl_h
-#define WebStorageAreaImpl_h
-
-#include "StorageAreaImpl.h"
-#include "WebStorageArea.h"
-
-namespace WebKit {
-
-class WebStorageAreaImpl : public WebStorageArea {
-public:
-    WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea);
-    virtual ~WebStorageAreaImpl();
-    virtual unsigned length();
-    virtual WebString key(unsigned index);
-    virtual WebString getItem(const WebString& key);
-    virtual void setItem(const WebString& key, const WebString& value, const WebURL&, Result&, WebString& oldValue);
-    virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue);
-    virtual void clear(const WebURL& url, bool& somethingCleared);
-
-    // For storage events in single-process mode and test shell.
-    static const WebURL* currentStorageEventURL() { return storageEventURL; }
-
-private:
-    class ScopedStorageEventURL {
-    public:
-        ScopedStorageEventURL(const WebURL& url)
-        {
-            // FIXME: Once storage events are fired async in WebKit (as they should
-            //        be) this can be ASSERTed to be 0 rather than saved.
-            m_existingStorageEventURL = storageEventURL;
-            storageEventURL = &url;
-        }
-        ~ScopedStorageEventURL()
-        {
-            storageEventURL = m_existingStorageEventURL;
-        }
-
-    private:
-        const WebURL* m_existingStorageEventURL;
-    };
-
-    static const WebURL* storageEventURL;
-
-    RefPtr<WebCore::StorageArea> m_storageArea;
-};
-
-} // namespace WebKit
-
-#endif // WebStorageAreaImpl_h

Modified: trunk/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -34,7 +34,6 @@
 #include "KURL.h"
 #include "SecurityOrigin.h"
 
-#include "WebStorageAreaImpl.h"
 #include "platform/WebURL.h"
 #include <wtf/PassOwnPtr.h>
 
@@ -55,15 +54,11 @@
 
 void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue,
                                                          const WebString& newValue, const WebString& origin,
-                                                         const WebURL& passedInURL, bool isLocalStorage)
+                                                         const WebURL& pageURL, bool isLocalStorage)
 {
-    // Hack for single-process mode and test shell.
-    const WebURL* storageAreaImplURL = WebStorageAreaImpl::currentStorageEventURL();
-    const WebURL& url = "" ? *storageAreaImplURL : passedInURL;
-
     WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage;
     RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin);
-    m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), url, storageType);
+    m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), pageURL, storageType);
 }
 
 } // namespace WebKit

Deleted: trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.cpp	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2009 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "WebStorageNamespaceImpl.h"
-
-#include "SecurityOrigin.h"
-#include "WebStorageAreaImpl.h"
-#include "platform/WebString.h"
-
-namespace WebKit {
-
-WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebString& path, unsigned quota)
-{
-    return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::localStorageNamespace(path, quota));
-}
-
-WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace(unsigned quota)
-{
-    return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(quota));
-}
-
-WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace)
-    : m_storageNamespace(storageNamespace)
-{
-}
-
-WebStorageNamespaceImpl::~WebStorageNamespaceImpl()
-{
-}
-
-WebStorageArea* WebStorageNamespaceImpl::createStorageArea(const WebString& originString)
-{
-    RefPtr<WebCore::SecurityOrigin> origin = WebCore::SecurityOrigin::createFromString(originString);
-    return new WebStorageAreaImpl(m_storageNamespace->storageArea(origin.release()));
-}
-
-WebStorageNamespace* WebStorageNamespaceImpl::copy()
-{
-    return new WebStorageNamespaceImpl(m_storageNamespace->copy());
-}
-
-void WebStorageNamespaceImpl::close()
-{
-    m_storageNamespace->close();
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.h (114159 => 114160)


--- trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.h	2012-04-13 19:32:52 UTC (rev 114159)
+++ trunk/Source/WebKit/chromium/src/WebStorageNamespaceImpl.h	2012-04-13 19:33:55 UTC (rev 114160)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2009 Google 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:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * 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.
- *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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.
- */
-
-#ifndef WebStorageNamespaceImpl_h
-#define WebStorageNamespaceImpl_h
-
-#include "StorageNamespaceImpl.h"
-#include "WebStorageNamespace.h"
-
-namespace WebKit {
-
-class WebStorageNamespaceImpl : public WebStorageNamespace {
-public:
-    WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace);
-    virtual ~WebStorageNamespaceImpl();
-    virtual WebStorageArea* createStorageArea(const WebString& origin);
-    virtual WebStorageNamespace* copy();
-    virtual void close();
-
-private:
-    RefPtr<WebCore::StorageNamespace> m_storageNamespace;
-};
-
-} // namespace WebKit
-
-#endif // WebStorageNamespaceImpl_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to