| Differences between
and this patch
- a/WebCore/WebCore.xcodeproj/project.pbxproj -16 / +8 lines
Lines 829-836 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
829
		51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */; };
829
		51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */; };
830
		51BE37DF0DAEE00E001085FC /* StorageArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BE37DD0DAEE00E001085FC /* StorageArea.cpp */; };
830
		51BE37DF0DAEE00E001085FC /* StorageArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BE37DD0DAEE00E001085FC /* StorageArea.cpp */; };
831
		51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE37DE0DAEE00E001085FC /* StorageArea.h */; };
831
		51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE37DE0DAEE00E001085FC /* StorageArea.h */; };
832
		51BE38280DAEF7DA001085FC /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BE38260DAEF7DA001085FC /* LocalStorage.cpp */; };
832
		51BE38280DAEF7DA001085FC /* StorageNamespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BE38260DAEF7DA001085FC /* StorageNamespace.cpp */; };
833
		51BE38290DAEF7DA001085FC /* LocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE38270DAEF7DA001085FC /* LocalStorage.h */; };
833
		51BE38290DAEF7DA001085FC /* StorageNamespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE38270DAEF7DA001085FC /* StorageNamespace.h */; };
834
		51C0AA390F2AA10A001648C2 /* CachedFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0AA380F2AA10A001648C2 /* CachedFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
834
		51C0AA390F2AA10A001648C2 /* CachedFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0AA380F2AA10A001648C2 /* CachedFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
835
		51C0AA410F2AA15E001648C2 /* CachedFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */; };
835
		51C0AA410F2AA15E001648C2 /* CachedFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */; };
836
		51C81B890C4422F70019ECE3 /* FTPDirectoryParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */; };
836
		51C81B890C4422F70019ECE3 /* FTPDirectoryParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */; };
Lines 844-851 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
844
		51E0BABC0DA5547100A9E417 /* StorageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BABA0DA5547100A9E417 /* StorageEvent.cpp */; };
844
		51E0BABC0DA5547100A9E417 /* StorageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BABA0DA5547100A9E417 /* StorageEvent.cpp */; };
845
		51E0BAEA0DA55D4A00A9E417 /* JSStorageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BAE80DA55D4A00A9E417 /* JSStorageEvent.cpp */; };
845
		51E0BAEA0DA55D4A00A9E417 /* JSStorageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BAE80DA55D4A00A9E417 /* JSStorageEvent.cpp */; };
846
		51E0BAEB0DA55D4A00A9E417 /* JSStorageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E0BAE90DA55D4A00A9E417 /* JSStorageEvent.h */; };
846
		51E0BAEB0DA55D4A00A9E417 /* JSStorageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E0BAE90DA55D4A00A9E417 /* JSStorageEvent.h */; };
847
		51E0BB230DA572A600A9E417 /* SessionStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E0BB210DA572A600A9E417 /* SessionStorage.h */; };
848
		51E0BB240DA572A600A9E417 /* SessionStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BB220DA572A600A9E417 /* SessionStorage.cpp */; };
849
		51E0BB380DA5ACB600A9E417 /* StorageMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E0BB360DA5ACB600A9E417 /* StorageMap.h */; };
847
		51E0BB380DA5ACB600A9E417 /* StorageMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E0BB360DA5ACB600A9E417 /* StorageMap.h */; };
850
		51E0BB390DA5ACB600A9E417 /* StorageMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */; };
848
		51E0BB390DA5ACB600A9E417 /* StorageMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */; };
851
		51E1ECAF0C91C54600DC255B /* AutodrainedPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E1ECAD0C91C54600DC255B /* AutodrainedPool.mm */; };
849
		51E1ECAF0C91C54600DC255B /* AutodrainedPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E1ECAD0C91C54600DC255B /* AutodrainedPool.mm */; };
Lines 5754-5761 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
5754
		51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = "<group>"; };
5752
		51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = "<group>"; };
5755
		51BE37DD0DAEE00E001085FC /* StorageArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageArea.cpp; sourceTree = "<group>"; };
5753
		51BE37DD0DAEE00E001085FC /* StorageArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageArea.cpp; sourceTree = "<group>"; };
5756
		51BE37DE0DAEE00E001085FC /* StorageArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageArea.h; sourceTree = "<group>"; };
5754
		51BE37DE0DAEE00E001085FC /* StorageArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageArea.h; sourceTree = "<group>"; };
5757
		51BE38260DAEF7DA001085FC /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = "<group>"; };
5755
		51BE38260DAEF7DA001085FC /* StorageNamespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespace.cpp; sourceTree = "<group>"; };
5758
		51BE38270DAEF7DA001085FC /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = "<group>"; };
5756
		51BE38270DAEF7DA001085FC /* StorageNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageNamespace.h; sourceTree = "<group>"; };
5759
		51C0AA380F2AA10A001648C2 /* CachedFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFrame.h; sourceTree = "<group>"; };
5757
		51C0AA380F2AA10A001648C2 /* CachedFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFrame.h; sourceTree = "<group>"; };
5760
		51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedFrame.cpp; sourceTree = "<group>"; };
5758
		51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedFrame.cpp; sourceTree = "<group>"; };
5761
		51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryParser.cpp; sourceTree = "<group>"; };
5759
		51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryParser.cpp; sourceTree = "<group>"; };
Lines 5770-5777 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
5770
		51E0BABD0DA5548400A9E417 /* StorageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = StorageEvent.idl; sourceTree = "<group>"; };
5768
		51E0BABD0DA5548400A9E417 /* StorageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = StorageEvent.idl; sourceTree = "<group>"; };
5771
		51E0BAE80DA55D4A00A9E417 /* JSStorageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStorageEvent.cpp; sourceTree = "<group>"; };
5769
		51E0BAE80DA55D4A00A9E417 /* JSStorageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStorageEvent.cpp; sourceTree = "<group>"; };
5772
		51E0BAE90DA55D4A00A9E417 /* JSStorageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStorageEvent.h; sourceTree = "<group>"; };
5770
		51E0BAE90DA55D4A00A9E417 /* JSStorageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStorageEvent.h; sourceTree = "<group>"; };
5773
		51E0BB210DA572A600A9E417 /* SessionStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionStorage.h; sourceTree = "<group>"; };
5774
		51E0BB220DA572A600A9E417 /* SessionStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionStorage.cpp; sourceTree = "<group>"; };
5775
		51E0BB360DA5ACB600A9E417 /* StorageMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageMap.h; sourceTree = "<group>"; };
5771
		51E0BB360DA5ACB600A9E417 /* StorageMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageMap.h; sourceTree = "<group>"; };
5776
		51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageMap.cpp; sourceTree = "<group>"; };
5772
		51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageMap.cpp; sourceTree = "<group>"; };
5777
		51E1ECAD0C91C54600DC255B /* AutodrainedPool.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AutodrainedPool.mm; sourceTree = "<group>"; };
5773
		51E1ECAD0C91C54600DC255B /* AutodrainedPool.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AutodrainedPool.mm; sourceTree = "<group>"; };
Lines 9599-9606 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
9599
				1AD51A130CB59CD300953D11 /* DatabaseTracker.cpp */,
9595
				1AD51A130CB59CD300953D11 /* DatabaseTracker.cpp */,
9600
				1AD51A120CB59CD300953D11 /* DatabaseTracker.h */,
9596
				1AD51A120CB59CD300953D11 /* DatabaseTracker.h */,
9601
				51FAFE330CECBF2D00BB3F24 /* DatabaseTrackerClient.h */,
9597
				51FAFE330CECBF2D00BB3F24 /* DatabaseTrackerClient.h */,
9602
				51BE38260DAEF7DA001085FC /* LocalStorage.cpp */,
9603
				51BE38270DAEF7DA001085FC /* LocalStorage.h */,
9604
				511F23130DC160DA004F0032 /* LocalStorageTask.cpp */,
9598
				511F23130DC160DA004F0032 /* LocalStorageTask.cpp */,
9605
				511F23140DC160DA004F0032 /* LocalStorageTask.h */,
9599
				511F23140DC160DA004F0032 /* LocalStorageTask.h */,
9606
				511F23150DC160DA004F0032 /* LocalStorageThread.cpp */,
9600
				511F23150DC160DA004F0032 /* LocalStorageThread.cpp */,
Lines 9626-9633 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
9626
				1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */,
9620
				1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */,
9627
				1A7CCB170CD9469A00B7B64E /* SQLTransactionCallback.h */,
9621
				1A7CCB170CD9469A00B7B64E /* SQLTransactionCallback.h */,
9628
				1A7CCB180CD9469A00B7B64E /* SQLTransactionErrorCallback.h */,
9622
				1A7CCB180CD9469A00B7B64E /* SQLTransactionErrorCallback.h */,
9629
				51E0BB220DA572A600A9E417 /* SessionStorage.cpp */,
9630
				51E0BB210DA572A600A9E417 /* SessionStorage.h */,
9631
				51E3F9C50DA059DC00250911 /* Storage.cpp */,
9623
				51E3F9C50DA059DC00250911 /* Storage.cpp */,
9632
				51E3F9C40DA059DC00250911 /* Storage.h */,
9624
				51E3F9C40DA059DC00250911 /* Storage.h */,
9633
				51E3F9D10DA05D7100250911 /* Storage.idl */,
9625
				51E3F9D10DA05D7100250911 /* Storage.idl */,
Lines 9640-9645 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
9640
				51E0BABD0DA5548400A9E417 /* StorageEvent.idl */,
9632
				51E0BABD0DA5548400A9E417 /* StorageEvent.idl */,
9641
				51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */,
9633
				51E0BB370DA5ACB600A9E417 /* StorageMap.cpp */,
9642
				51E0BB360DA5ACB600A9E417 /* StorageMap.h */,
9634
				51E0BB360DA5ACB600A9E417 /* StorageMap.h */,
9635
				51BE38260DAEF7DA001085FC /* StorageNamespace.cpp */,
9636
				51BE38270DAEF7DA001085FC /* StorageNamespace.h */,
9643
				C5102D920FD9AA2D00FAFF04 /* StorageSyncManager.h */,
9637
				C5102D920FD9AA2D00FAFF04 /* StorageSyncManager.h */,
9644
				C5102D930FD9AA2D00FAFF04 /* StorageSyncManager.cpp */,
9638
				C5102D930FD9AA2D00FAFF04 /* StorageSyncManager.cpp */,
9645
			);
9639
			);
Lines 16063-16069 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
16063
				A7AD2F880EC89D07008AB002 /* LinkHash.h in Headers */,
16057
				A7AD2F880EC89D07008AB002 /* LinkHash.h in Headers */,
16064
				656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
16058
				656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
16065
				06E81ED70AB5D5E900C87837 /* LocalCurrentGraphicsContext.h in Headers */,
16059
				06E81ED70AB5D5E900C87837 /* LocalCurrentGraphicsContext.h in Headers */,
16066
				51BE38290DAEF7DA001085FC /* LocalStorage.h in Headers */,
16060
				51BE38290DAEF7DA001085FC /* StorageNamespace.h in Headers */,
16067
				511F23180DC160DA004F0032 /* LocalStorageTask.h in Headers */,
16061
				511F23180DC160DA004F0032 /* LocalStorageTask.h in Headers */,
16068
				511F231A0DC160DA004F0032 /* LocalStorageThread.h in Headers */,
16062
				511F231A0DC160DA004F0032 /* LocalStorageThread.h in Headers */,
16069
				935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */,
16063
				935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */,
Lines 16503-16509 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
16503
				084AEBE50FB505FA0038483E /* SelectElement.h in Headers */,
16497
				084AEBE50FB505FA0038483E /* SelectElement.h in Headers */,
16504
				93309E0E099E64920056E581 /* SelectionController.h in Headers */,
16498
				93309E0E099E64920056E581 /* SelectionController.h in Headers */,
16505
				BC7FA6810D1F167900DB22A9 /* SelectorNodeList.h in Headers */,
16499
				BC7FA6810D1F167900DB22A9 /* SelectorNodeList.h in Headers */,
16506
				51E0BB230DA572A600A9E417 /* SessionStorage.h in Headers */,
16507
				93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
16500
				93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
16508
				93F1994F08245E59001E9ABC /* Settings.h in Headers */,
16501
				93F1994F08245E59001E9ABC /* Settings.h in Headers */,
16509
				BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
16502
				BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
Lines 18126-18132 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec10
18126
				A7AD2F870EC89D07008AB002 /* LinkHash.cpp in Sources */,
18119
				A7AD2F870EC89D07008AB002 /* LinkHash.cpp in Sources */,
18127
				656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */,
18120
				656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */,
18128
				06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */,
18121
				06E81EEC0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm in Sources */,
18129
				51BE38280DAEF7DA001085FC /* LocalStorage.cpp in Sources */,
18122
				51BE38280DAEF7DA001085FC /* StorageNamespace.cpp in Sources */,
18130
				511F23170DC160DA004F0032 /* LocalStorageTask.cpp in Sources */,
18123
				511F23170DC160DA004F0032 /* LocalStorageTask.cpp in Sources */,
18131
				511F23190DC160DA004F0032 /* LocalStorageThread.cpp in Sources */,
18124
				511F23190DC160DA004F0032 /* LocalStorageThread.cpp in Sources */,
18132
				935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */,
18125
				935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */,
Lines 18526-18532 a/WebCore/WebCore.xcodeproj/project.pbxproj_sec11
18526
				93309E0D099E64920056E581 /* SelectionController.cpp in Sources */,
18519
				93309E0D099E64920056E581 /* SelectionController.cpp in Sources */,
18527
				4A8C96EB0BE69032004EEFF0 /* SelectionControllerMac.mm in Sources */,
18520
				4A8C96EB0BE69032004EEFF0 /* SelectionControllerMac.mm in Sources */,
18528
				BC7FA6820D1F167900DB22A9 /* SelectorNodeList.cpp in Sources */,
18521
				BC7FA6820D1F167900DB22A9 /* SelectorNodeList.cpp in Sources */,
18529
				51E0BB240DA572A600A9E417 /* SessionStorage.cpp in Sources */,
18530
				93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
18522
				93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
18531
				14C9A5EA0B3D105F005A0232 /* Settings.cpp in Sources */,
18523
				14C9A5EA0B3D105F005A0232 /* Settings.cpp in Sources */,
18532
				BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
18524
				BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
- a/WebCore/page/Chrome.cpp -3 / +3 lines
Lines 46-52 a/WebCore/page/Chrome.cpp_sec1
46
#include <wtf/Vector.h>
46
#include <wtf/Vector.h>
47
47
48
#if ENABLE(DOM_STORAGE)
48
#if ENABLE(DOM_STORAGE)
49
#include "SessionStorage.h"
49
#include "StorageNamespace.h"
50
#endif
50
#endif
51
51
52
namespace WebCore {
52
namespace WebCore {
Lines 147-154 Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const a/WebCore/page/Chrome.cpp_sec2
147
147
148
#if ENABLE(DOM_STORAGE)
148
#if ENABLE(DOM_STORAGE)
149
    if (newPage) {
149
    if (newPage) {
150
        if (SessionStorage* oldSessionStorage = m_page->sessionStorage(false))
150
        if (StorageNamespace* oldSessionStorage = m_page->sessionStorage(false))
151
            newPage->setSessionStorage(oldSessionStorage->copy(newPage));
151
            newPage->setSessionStorage(oldSessionStorage->copy());
152
    }
152
    }
153
#endif
153
#endif
154
154
- a/WebCore/page/DOMWindow.cpp -3 / +2 lines
Lines 70-78 a/WebCore/page/DOMWindow.cpp_sec1
70
#endif
70
#endif
71
71
72
#if ENABLE(DOM_STORAGE)
72
#if ENABLE(DOM_STORAGE)
73
#include "LocalStorage.h"
74
#include "SessionStorage.h"
75
#include "Storage.h"
73
#include "Storage.h"
74
#include "StorageNamespace.h"
76
#include "StorageArea.h"
75
#include "StorageArea.h"
77
#endif
76
#endif
78
77
Lines 564-570 Storage* DOMWindow::localStorage() const a/WebCore/page/DOMWindow.cpp_sec2
564
    if (!settings || !settings->localStorageEnabled())
563
    if (!settings || !settings->localStorageEnabled())
565
        return 0;
564
        return 0;
566
565
567
    LocalStorage* localStorage = page->group().localStorage();
566
    StorageNamespace* localStorage = page->group().localStorage();
568
    RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : 0; 
567
    RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : 0; 
569
    if (storageArea) {
568
    if (storageArea) {
570
        page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
569
        page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
- a/WebCore/page/DOMWindow.h -1 lines
Lines 61-67 namespace WebCore { a/WebCore/page/DOMWindow.h_sec1
61
    class WebKitPoint;
61
    class WebKitPoint;
62
62
63
#if ENABLE(DOM_STORAGE)
63
#if ENABLE(DOM_STORAGE)
64
    class SessionStorage;
65
    class Storage;
64
    class Storage;
66
#endif
65
#endif
67
66
- a/WebCore/page/Page.cpp -6 / +4 lines
Lines 57-65 a/WebCore/page/Page.cpp_sec1
57
#include <wtf/StdLibExtras.h>
57
#include <wtf/StdLibExtras.h>
58
58
59
#if ENABLE(DOM_STORAGE)
59
#if ENABLE(DOM_STORAGE)
60
#include "LocalStorage.h"
61
#include "SessionStorage.h"
62
#include "StorageArea.h"
60
#include "StorageArea.h"
61
#include "StorageNamespace.h"
63
#endif
62
#endif
64
63
65
#if ENABLE(JAVASCRIPT_DEBUGGER)
64
#if ENABLE(JAVASCRIPT_DEBUGGER)
Lines 548-564 void Page::setDebugger(JSC::Debugger* debugger) a/WebCore/page/Page.cpp_sec2
548
}
547
}
549
548
550
#if ENABLE(DOM_STORAGE)
549
#if ENABLE(DOM_STORAGE)
551
SessionStorage* Page::sessionStorage(bool optionalCreate)
550
StorageNamespace* Page::sessionStorage(bool optionalCreate)
552
{
551
{
553
    if (!m_sessionStorage && optionalCreate)
552
    if (!m_sessionStorage && optionalCreate)
554
        m_sessionStorage = SessionStorage::create(this);
553
        m_sessionStorage = StorageNamespace::sessionStorageNamespace();
555
554
556
    return m_sessionStorage.get();
555
    return m_sessionStorage.get();
557
}
556
}
558
557
559
void Page::setSessionStorage(PassRefPtr<SessionStorage> newStorage)
558
void Page::setSessionStorage(PassRefPtr<StorageNamespace> newStorage)
560
{
559
{
561
    ASSERT(newStorage->page() == this);
562
    m_sessionStorage = newStorage;
560
    m_sessionStorage = newStorage;
563
}
561
}
564
#endif
562
#endif
- a/WebCore/page/Page.h -4 / +4 lines
Lines 63-69 namespace WebCore { a/WebCore/page/Page.h_sec1
63
    class VisibleSelection;
63
    class VisibleSelection;
64
    class SelectionController;
64
    class SelectionController;
65
#if ENABLE(DOM_STORAGE)
65
#if ENABLE(DOM_STORAGE)
66
    class SessionStorage;
66
    class StorageNamespace;
67
#endif
67
#endif
68
    class Settings;
68
    class Settings;
69
#if ENABLE(WML)
69
#if ENABLE(WML)
Lines 176-183 namespace WebCore { a/WebCore/page/Page.h_sec2
176
        static void visitedStateChanged(PageGroup*, LinkHash visitedHash);
176
        static void visitedStateChanged(PageGroup*, LinkHash visitedHash);
177
177
178
#if ENABLE(DOM_STORAGE)
178
#if ENABLE(DOM_STORAGE)
179
        SessionStorage* sessionStorage(bool optionalCreate = true);
179
        StorageNamespace* sessionStorage(bool optionalCreate = true);
180
        void setSessionStorage(PassRefPtr<SessionStorage>);
180
        void setSessionStorage(PassRefPtr<StorageNamespace>);
181
#endif
181
#endif
182
182
183
#if ENABLE(WML)
183
#if ENABLE(WML)
Lines 248-254 namespace WebCore { a/WebCore/page/Page.h_sec3
248
        int m_customHTMLTokenizerChunkSize;
248
        int m_customHTMLTokenizerChunkSize;
249
249
250
#if ENABLE(DOM_STORAGE)
250
#if ENABLE(DOM_STORAGE)
251
        RefPtr<SessionStorage> m_sessionStorage;
251
        RefPtr<StorageNamespace> m_sessionStorage;
252
#endif
252
#endif
253
253
254
#if PLATFORM(WIN) || (PLATFORM(WX) && defined(__WXMSW__)) || (PLATFORM(QT) && defined(Q_WS_WIN))
254
#if PLATFORM(WIN) || (PLATFORM(WX) && defined(__WXMSW__)) || (PLATFORM(QT) && defined(Q_WS_WIN))
- a/WebCore/page/PageGroup.cpp -4 / +4 lines
Lines 32-39 a/WebCore/page/PageGroup.cpp_sec1
32
#include "Settings.h"
32
#include "Settings.h"
33
33
34
#if ENABLE(DOM_STORAGE)
34
#if ENABLE(DOM_STORAGE)
35
#include "LocalStorage.h"
36
#include "StorageArea.h"
35
#include "StorageArea.h"
36
#include "StorageNamespace.h"
37
#endif
37
#endif
38
38
39
#if PLATFORM(CHROMIUM)
39
#if PLATFORM(CHROMIUM)
Lines 97-103 void PageGroup::closeLocalStorage() a/WebCore/page/PageGroup.cpp_sec2
97
    PageGroupMap::iterator end = pageGroups->end();
97
    PageGroupMap::iterator end = pageGroups->end();
98
98
99
    for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
99
    for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
100
        if (LocalStorage* localStorage = it->second->localStorage())
100
        if (StorageNamespace* localStorage = it->second->localStorage())
101
            localStorage->close();
101
            localStorage->close();
102
    }
102
    }
103
#endif
103
#endif
Lines 110-116 void PageGroup::addPage(Page* page) a/WebCore/page/PageGroup.cpp_sec3
110
    m_pages.add(page);
110
    m_pages.add(page);
111
#if ENABLE(DOM_STORAGE)
111
#if ENABLE(DOM_STORAGE)
112
    if (!m_localStorage)
112
    if (!m_localStorage)
113
        m_localStorage = LocalStorage::localStorage(page->settings()->localStorageDatabasePath());
113
        m_localStorage = StorageNamespace::localStorageNamespace(page->settings()->localStorageDatabasePath());
114
#endif
114
#endif
115
}
115
}
116
116
Lines 185-191 void PageGroup::setShouldTrackVisitedLinks(bool shouldTrack) a/WebCore/page/PageGroup.cpp_sec4
185
}
185
}
186
186
187
#if ENABLE(DOM_STORAGE)
187
#if ENABLE(DOM_STORAGE)
188
LocalStorage* PageGroup::localStorage()
188
StorageNamespace* PageGroup::localStorage()
189
{
189
{
190
    return m_localStorage.get();
190
    return m_localStorage.get();
191
}
191
}
- a/WebCore/page/PageGroup.h -3 / +3 lines
Lines 34-40 a/WebCore/page/PageGroup.h_sec1
34
namespace WebCore {
34
namespace WebCore {
35
35
36
    class KURL;
36
    class KURL;
37
    class LocalStorage;
37
    class StorageNamespace;
38
    class Page;
38
    class Page;
39
39
40
    class PageGroup : Noncopyable {
40
    class PageGroup : Noncopyable {
Lines 63-69 namespace WebCore { a/WebCore/page/PageGroup.h_sec2
63
        unsigned identifier() { return m_identifier; }
63
        unsigned identifier() { return m_identifier; }
64
64
65
#if ENABLE(DOM_STORAGE)
65
#if ENABLE(DOM_STORAGE)
66
        LocalStorage* localStorage();
66
        StorageNamespace* localStorage();
67
#endif
67
#endif
68
68
69
    private:
69
    private:
Lines 78-84 namespace WebCore { a/WebCore/page/PageGroup.h_sec3
78
78
79
        unsigned m_identifier;
79
        unsigned m_identifier;
80
#if ENABLE(DOM_STORAGE)
80
#if ENABLE(DOM_STORAGE)
81
        RefPtr<LocalStorage> m_localStorage;
81
        RefPtr<StorageNamespace> m_localStorage;
82
#endif
82
#endif
83
    };
83
    };
84
84
- a/WebCore/storage/LocalStorage.cpp -111 lines
Lines 1-111 a/WebCore/storage/LocalStorage.cpp_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "LocalStorage.h"
28
29
#include "CString.h"
30
#include "EventNames.h"
31
#include "FileSystem.h"
32
#include "Frame.h"
33
#include "FrameTree.h"
34
#include "Page.h"
35
#include "PageGroup.h"
36
#include "StorageArea.h"
37
#include "StorageSyncManager.h"
38
#include <wtf/StdLibExtras.h>
39
40
namespace WebCore {
41
42
typedef HashMap<String, LocalStorage*> LocalStorageMap;
43
44
static LocalStorageMap& localStorageMap()
45
{
46
    DEFINE_STATIC_LOCAL(LocalStorageMap, localStorageMap, ());
47
    return localStorageMap;
48
}
49
50
PassRefPtr<LocalStorage> LocalStorage::localStorage(const String& path)
51
{
52
    const String lookupPath = path.isNull() ? String("") : path;
53
    LocalStorageMap::iterator it = localStorageMap().find(lookupPath);
54
    if (it == localStorageMap().end()) {
55
        RefPtr<LocalStorage> localStorage = adoptRef(new LocalStorage(lookupPath));
56
        localStorageMap().set(lookupPath, localStorage.get());
57
        return localStorage.release();
58
    }
59
    
60
    return it->second;
61
}
62
63
LocalStorage::LocalStorage(const String& path)
64
    : m_path(path.copy())
65
    , m_syncManager(0)
66
{
67
    if (!m_path.isEmpty())
68
        m_syncManager = StorageSyncManager::create(m_path);
69
}
70
71
LocalStorage::~LocalStorage()
72
{
73
    ASSERT(localStorageMap().get(m_path) == this);
74
    localStorageMap().remove(m_path);
75
}
76
77
PassRefPtr<StorageArea> LocalStorage::storageArea(SecurityOrigin* origin)
78
{
79
    ASSERT(isMainThread());
80
81
    // FIXME: If the security origin in question has never had a storage area established,
82
    // we need to ask a client call if establishing it is okay.  If the client denies the request,
83
    // this method will return null.
84
    // The sourceFrame argument exists for the purpose of asking a client.
85
    // To know if an area has previously been established, we need to wait until this LocalStorage 
86
    // object has finished it's AreaImport task.
87
88
    // FIXME: If the storage area is being established for the first time here, we need to 
89
    // sync its existance and quota out to disk via an task of type AreaSync
90
91
    RefPtr<StorageArea> storageArea;
92
    if (storageArea = m_storageAreaMap.get(origin))
93
        return storageArea.release();
94
    
95
    storageArea = StorageArea::createLocalStorage(origin, m_syncManager);
96
    m_storageAreaMap.set(origin, storageArea);
97
    return storageArea.release();
98
}
99
100
void LocalStorage::close()
101
{
102
    ASSERT(isMainThread());
103
104
    LocalStorageAreaMap::iterator end = m_storageAreaMap.end();
105
    for (LocalStorageAreaMap::iterator it = m_storageAreaMap.begin(); it != end; ++it)
106
        it->second->scheduleFinalSync();
107
    
108
    m_syncManager = 0;
109
}
110
111
} // namespace WebCore
- a/WebCore/storage/LocalStorage.h -61 lines
Lines 1-61 a/WebCore/storage/LocalStorage.h_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef LocalStorage_h
27
#define LocalStorage_h
28
29
#include "SecurityOriginHash.h"
30
31
#include <wtf/HashMap.h>
32
#include <wtf/RefCounted.h>
33
34
namespace WebCore {
35
36
    class StorageArea;
37
    class StorageSyncManager;
38
39
    class LocalStorage : public RefCounted<LocalStorage> {
40
    public:
41
        ~LocalStorage();
42
43
        static PassRefPtr<LocalStorage> localStorage(const String& path);
44
45
        PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
46
47
        void close();
48
49
    private:
50
        LocalStorage(const String& path);
51
52
        typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> LocalStorageAreaMap;
53
        LocalStorageAreaMap m_storageAreaMap;
54
55
        String m_path;
56
        RefPtr<StorageSyncManager> m_syncManager;
57
    };
58
59
} // namespace WebCore
60
61
#endif // LocalStorage_h
- a/WebCore/storage/LocalStorageTask.cpp -1 / +1 lines
Lines 26-34 a/WebCore/storage/LocalStorageTask.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "LocalStorageTask.h"
27
#include "LocalStorageTask.h"
28
28
29
#include "LocalStorage.h"
30
#include "LocalStorageThread.h"
29
#include "LocalStorageThread.h"
31
#include "StorageAreaSync.h"
30
#include "StorageAreaSync.h"
31
#include "StorageNamespace.h"
32
32
33
namespace WebCore {
33
namespace WebCore {
34
34
- a/WebCore/storage/LocalStorageThread.cpp -1 / +1 lines
Lines 26-34 a/WebCore/storage/LocalStorageThread.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "LocalStorageThread.h"
27
#include "LocalStorageThread.h"
28
28
29
#include "LocalStorage.h"
30
#include "LocalStorageTask.h"
29
#include "LocalStorageTask.h"
31
#include "StorageAreaSync.h"
30
#include "StorageAreaSync.h"
31
#include "StorageNamespace.h"
32
32
33
namespace WebCore {
33
namespace WebCore {
34
34
- a/WebCore/storage/SessionStorage.cpp -75 lines
Lines 1-75 a/WebCore/storage/SessionStorage.cpp_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
 
26
#include "config.h"
27
#include "SessionStorage.h"
28
29
#include "EventNames.h"
30
#include "Frame.h"
31
#include "FrameTree.h"
32
#include "Page.h"
33
#include "SecurityOrigin.h"
34
#include "StorageArea.h"
35
#include "StorageMap.h"
36
37
namespace WebCore {
38
39
PassRefPtr<SessionStorage> SessionStorage::create(Page* page)
40
{
41
    return adoptRef(new SessionStorage(page));
42
}
43
44
SessionStorage::SessionStorage(Page* page)
45
    : m_page(page)
46
{
47
    ASSERT(m_page);
48
}
49
50
PassRefPtr<SessionStorage> SessionStorage::copy(Page* newPage)
51
{
52
    ASSERT(newPage);
53
    RefPtr<SessionStorage> newSession = SessionStorage::create(newPage);
54
    
55
    SessionStorageAreaMap::iterator end = m_storageAreaMap.end();
56
    for (SessionStorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i) {
57
        RefPtr<StorageArea> areaCopy = i->second->copy(i->first.get(), newPage);
58
        newSession->m_storageAreaMap.set(i->first, areaCopy.release());
59
    }
60
    
61
    return newSession.release();
62
}
63
64
PassRefPtr<StorageArea> SessionStorage::storageArea(SecurityOrigin* origin)
65
{
66
    RefPtr<StorageArea> storageArea;
67
    if (storageArea = m_storageAreaMap.get(origin))
68
        return storageArea.release();
69
        
70
    storageArea = StorageArea::createSessionStorage(origin, m_page);
71
    m_storageAreaMap.set(origin, storageArea);
72
    return storageArea.release();
73
}
74
75
}
- a/WebCore/storage/SessionStorage.h -63 lines
Lines 1-63 a/WebCore/storage/SessionStorage.h_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef SessionStorage_h
27
#define SessionStorage_h
28
29
#include "SecurityOriginHash.h"
30
#include "StorageArea.h"
31
32
#include <wtf/HashMap.h>
33
#include <wtf/RefCounted.h>
34
35
namespace WebCore {
36
37
    class Page;
38
39
    class SessionStorage : public RefCounted<SessionStorage> {
40
    public:
41
        static PassRefPtr<SessionStorage> create(Page*);
42
        PassRefPtr<SessionStorage> copy(Page*);
43
        
44
        PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
45
46
#ifndef NDEBUG
47
        Page* page() { return m_page; }
48
#endif
49
50
    private:
51
        SessionStorage(Page*);
52
53
        void dispatchStorageEvent(StorageArea*, const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
54
55
        Page* m_page;
56
        
57
        typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> SessionStorageAreaMap;
58
        SessionStorageAreaMap m_storageAreaMap;
59
    };
60
61
} // namespace WebCore
62
63
#endif // SessionStorage_h
- a/WebCore/storage/StorageArea.cpp -33 / +43 lines
Lines 40-56 a/WebCore/storage/StorageArea.cpp_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
PassRefPtr<StorageArea> StorageArea::createLocalStorage(SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
43
PassRefPtr<StorageArea> StorageArea::create(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
44
{
44
{
45
    return adoptRef(new StorageArea(origin, syncManager));
45
    return adoptRef(new StorageArea(storageType, origin, syncManager));
46
}
46
}
47
47
48
StorageArea::StorageArea(SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
48
StorageArea::StorageArea(StorageType storageType, SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager)
49
    : m_securityOrigin(origin)
49
    : m_storageType(storageType)
50
    , m_securityOrigin(origin)
50
    , m_storageMap(StorageMap::create())
51
    , m_storageMap(StorageMap::create())
51
    , m_storageAreaSync(0)
52
    , m_storageAreaSync(0)
52
    , m_storageSyncManager(syncManager)
53
    , m_storageSyncManager(syncManager)
53
    , m_sessionStoragePage(0)
54
#ifndef NDEBUG
55
    , m_isShutdown(false)
56
#endif
54
{
57
{
55
    ASSERT(m_securityOrigin);
58
    ASSERT(m_securityOrigin);
56
    ASSERT(m_storageMap);
59
    ASSERT(m_storageMap);
Lines 64-102 StorageArea::StorageArea(SecurityOrigin* origin, PassRefPtr<StorageSyncManager> a/WebCore/storage/StorageArea.cpp_sec2
64
    }
67
    }
65
}
68
}
66
69
67
PassRefPtr<StorageArea> StorageArea::createSessionStorage(SecurityOrigin* origin, Page* page)
70
PassRefPtr<StorageArea> StorageArea::copy(SecurityOrigin* origin)
68
{
71
{
69
    return adoptRef(new StorageArea(origin, page, 0));
72
    ASSERT(!m_isShutdown);
73
    return adoptRef(new StorageArea(origin, this));
70
}
74
}
71
75
72
PassRefPtr<StorageArea> StorageArea::copy(SecurityOrigin* origin, Page* page)
76
StorageArea::StorageArea(SecurityOrigin* origin, StorageArea* area)
73
{
77
    : m_storageType(area->m_storageType)
74
    return adoptRef(new StorageArea(origin, page, this));
78
    , m_securityOrigin(origin)
75
}
76
77
StorageArea::StorageArea(SecurityOrigin* origin, Page* page, StorageArea* area)
78
    : m_securityOrigin(origin)
79
    , m_storageMap(area->m_storageMap)
79
    , m_storageMap(area->m_storageMap)
80
    , m_storageAreaSync(0)
80
    , m_storageAreaSync(0)
81
    , m_storageSyncManager(0)
81
    , m_storageSyncManager(area->m_storageSyncManager)
82
    , m_sessionStoragePage(page)
82
#ifndef NDEBUG
83
    , m_isShutdown(area->m_isShutdown)
84
#endif
83
{
85
{
84
    ASSERT(m_securityOrigin);
86
    ASSERT(m_securityOrigin);
85
    ASSERT(m_sessionStoragePage);
87
    ASSERT(m_storageMap);
86
    
88
    ASSERT(!m_isShutdown);
87
    if (!m_storageMap) {
88
        m_storageMap = StorageMap::create();
89
        ASSERT(m_storageMap);
90
    }
91
}
89
}
92
90
93
unsigned StorageArea::length() const
91
unsigned StorageArea::length() const
94
{
92
{
93
    ASSERT(!m_isShutdown);
95
    return m_storageMap->length();
94
    return m_storageMap->length();
96
}
95
}
97
96
98
String StorageArea::key(unsigned index, ExceptionCode& ec) const
97
String StorageArea::key(unsigned index, ExceptionCode& ec) const
99
{
98
{
99
    ASSERT(!m_isShutdown);
100
    blockUntilImportComplete();
100
    blockUntilImportComplete();
101
    
101
    
102
    String key;
102
    String key;
Lines 111-116 String StorageArea::key(unsigned index, ExceptionCode& ec) const a/WebCore/storage/StorageArea.cpp_sec3
111
111
112
String StorageArea::getItem(const String& key) const
112
String StorageArea::getItem(const String& key) const
113
{
113
{
114
    ASSERT(!m_isShutdown);
114
    blockUntilImportComplete();
115
    blockUntilImportComplete();
115
    
116
    
116
    return m_storageMap->getItem(key);
117
    return m_storageMap->getItem(key);
Lines 118-123 String StorageArea::getItem(const String& key) const a/WebCore/storage/StorageArea.cpp_sec4
118
119
119
void StorageArea::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
120
void StorageArea::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
120
{
121
{
122
    ASSERT(!m_isShutdown);
121
    ASSERT(!value.isNull());
123
    ASSERT(!value.isNull());
122
    blockUntilImportComplete();
124
    blockUntilImportComplete();
123
    
125
    
Lines 149-154 void StorageArea::setItem(const String& key, const String& value, ExceptionCode& a/WebCore/storage/StorageArea.cpp_sec5
149
151
150
void StorageArea::removeItem(const String& key, Frame* frame)
152
void StorageArea::removeItem(const String& key, Frame* frame)
151
{
153
{
154
    ASSERT(!m_isShutdown);
152
    blockUntilImportComplete();
155
    blockUntilImportComplete();
153
    
156
    
154
    if (frame->page()->settings()->privateBrowsingEnabled())
157
    if (frame->page()->settings()->privateBrowsingEnabled())
Lines 169-174 void StorageArea::removeItem(const String& key, Frame* frame) a/WebCore/storage/StorageArea.cpp_sec6
169
172
170
void StorageArea::clear(Frame* frame)
173
void StorageArea::clear(Frame* frame)
171
{
174
{
175
    ASSERT(!m_isShutdown);
172
    blockUntilImportComplete();
176
    blockUntilImportComplete();
173
    
177
    
174
    if (frame->page()->settings()->privateBrowsingEnabled())
178
    if (frame->page()->settings()->privateBrowsingEnabled())
Lines 183-188 void StorageArea::clear(Frame* frame) a/WebCore/storage/StorageArea.cpp_sec7
183
187
184
bool StorageArea::contains(const String& key) const
188
bool StorageArea::contains(const String& key) const
185
{
189
{
190
    ASSERT(!m_isShutdown);
186
    blockUntilImportComplete();
191
    blockUntilImportComplete();
187
    
192
    
188
    return m_storageMap->contains(key);
193
    return m_storageMap->contains(key);
Lines 190-208 bool StorageArea::contains(const String& key) const a/WebCore/storage/StorageArea.cpp_sec8
190
195
191
void StorageArea::importItem(const String& key, const String& value)
196
void StorageArea::importItem(const String& key, const String& value)
192
{
197
{
198
    ASSERT(!m_isShutdown);
193
    m_storageMap->importItem(key, value);
199
    m_storageMap->importItem(key, value);
194
}
200
}
195
201
196
void StorageArea::scheduleFinalSync()
202
void StorageArea::blockUntilImportComplete() const
197
{
203
{
198
    if (m_storageAreaSync)
204
    if (m_storageAreaSync)
199
        m_storageAreaSync->scheduleFinalSync();
205
        m_storageAreaSync->blockUntilImportComplete();
200
}
206
}
201
207
202
void StorageArea::blockUntilImportComplete() const
208
void StorageArea::close()
203
{
209
{
204
    if (m_storageAreaSync)
210
    if (m_storageAreaSync)
205
        m_storageAreaSync->blockUntilImportComplete();
211
        m_storageAreaSync->scheduleFinalSync();
212
    
213
#ifndef NDEBUG
214
    m_isShutdown = true;
215
#endif
206
}
216
}
207
217
208
void StorageArea::dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame)
218
void StorageArea::dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame)
Lines 211-228 void StorageArea::dispatchStorageEvent(const String& key, const String& oldValue a/WebCore/storage/StorageArea.cpp_sec9
211
    // of any given page in the group or mutate the page group itself.
221
    // of any given page in the group or mutate the page group itself.
212
    Vector<RefPtr<Frame> > frames;
222
    Vector<RefPtr<Frame> > frames;
213
    
223
    
214
    if (m_sessionStoragePage) {
224
    // FIXME: When can this occur?
225
    Page* page = sourceFrame->page();
226
    if (!page)
227
        return;
228
    
229
    if (m_storageType == SessionStorage) {
215
        // Send events only to our page.
230
        // Send events only to our page.
216
        for (Frame* frame = m_sessionStoragePage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
231
        for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
217
            if (frame->document()->securityOrigin()->equal(securityOrigin()))
232
            if (frame->document()->securityOrigin()->equal(securityOrigin()))
218
                frames.append(frame);
233
                frames.append(frame);
219
        }
234
        }
220
    } else {
235
    } else {
221
        // FIXME: When can this occur?
222
        Page* page = sourceFrame->page();
223
        if (!page)
224
            return;
225
        
226
        // Send events to every page.
236
        // Send events to every page.
227
        const HashSet<Page*>& pages = page->group().pages();
237
        const HashSet<Page*>& pages = page->group().pages();
228
        HashSet<Page*>::const_iterator end = pages.end();
238
        HashSet<Page*>::const_iterator end = pages.end();
- a/WebCore/storage/StorageArea.h -8 / +11 lines
Lines 46-57 namespace WebCore { a/WebCore/storage/StorageArea.h_sec1
46
    class StorageMap;
46
    class StorageMap;
47
    class StorageSyncManager;
47
    class StorageSyncManager;
48
    typedef int ExceptionCode;
48
    typedef int ExceptionCode;
49
    enum StorageType { LocalStorage, SessionStorage };
49
50
50
    class StorageArea : public ThreadSafeShared<StorageArea> {
51
    class StorageArea : public ThreadSafeShared<StorageArea> {
51
    public:
52
    public:
52
        static PassRefPtr<StorageArea> createLocalStorage(SecurityOrigin* origin, PassRefPtr<StorageSyncManager> syncManager);
53
        static PassRefPtr<StorageArea> create(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
53
        static PassRefPtr<StorageArea> createSessionStorage(SecurityOrigin* origin, Page* page);
54
        PassRefPtr<StorageArea> copy(SecurityOrigin*);
54
        PassRefPtr<StorageArea> copy(SecurityOrigin*, Page*);
55
        
55
        
56
        // The HTML5 DOM Storage API
56
        // The HTML5 DOM Storage API
57
        unsigned length() const;
57
        unsigned length() const;
Lines 62-89 namespace WebCore { a/WebCore/storage/StorageArea.h_sec2
62
        void clear(Frame* sourceFrame);
62
        void clear(Frame* sourceFrame);
63
63
64
        bool contains(const String& key) const;
64
        bool contains(const String& key) const;
65
        void scheduleFinalSync();
65
        void close();
66
66
67
        // Could be called from a background thread.
67
        // Could be called from a background thread.
68
        void importItem(const String& key, const String& value);
68
        void importItem(const String& key, const String& value);
69
        SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); }
69
        SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); }
70
70
71
    protected:
71
    protected:
72
        StorageArea(SecurityOrigin*, PassRefPtr<StorageSyncManager>);
72
        StorageArea(StorageType, SecurityOrigin*, PassRefPtr<StorageSyncManager>);
73
        StorageArea(SecurityOrigin*, Page*);
73
        StorageArea(SecurityOrigin*, StorageArea*);
74
        StorageArea(SecurityOrigin*, Page*, StorageArea*);
75
74
76
    private:
75
    private:
77
        void blockUntilImportComplete() const;
76
        void blockUntilImportComplete() const;
78
        
77
        
79
        void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
78
        void dispatchStorageEvent(const String& key, const String& oldValue, const String& newValue, Frame* sourceFrame);
80
        
79
        
80
        StorageType m_storageType;
81
        RefPtr<SecurityOrigin> m_securityOrigin;
81
        RefPtr<SecurityOrigin> m_securityOrigin;
82
        RefPtr<StorageMap> m_storageMap;
82
        RefPtr<StorageMap> m_storageMap;
83
        
83
        
84
        RefPtr<StorageAreaSync> m_storageAreaSync;
84
        RefPtr<StorageAreaSync> m_storageAreaSync;
85
        RefPtr<StorageSyncManager> m_storageSyncManager;
85
        RefPtr<StorageSyncManager> m_storageSyncManager;
86
        Page* m_sessionStoragePage;  // NULL iff it's LocalStorage
86
        
87
#ifndef NDEBUG
88
        bool m_isShutdown;
89
#endif
87
    };
90
    };
88
91
89
} // namespace WebCore
92
} // namespace WebCore
- a/WebCore/storage/StorageAreaSync.cpp +3 lines
Lines 74-79 void StorageAreaSync::scheduleFinalSync() a/WebCore/storage/StorageAreaSync.cpp_sec1
74
{
74
{
75
    ASSERT(isMainThread());
75
    ASSERT(isMainThread());
76
    
76
    
77
    // FIXME: Avoid races without having to block on the import here.
78
    blockUntilImportComplete();
79
    
77
    if (m_syncTimer.isActive())
80
    if (m_syncTimer.isActive())
78
        m_syncTimer.stop();
81
        m_syncTimer.stop();
79
    else {
82
    else {
- a/WebCore/storage/StorageNamespace.cpp +135 lines
Line 0 a/WebCore/storage/StorageNamespace.cpp_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "StorageNamespace.h"
28
29
// FIXME: Do we need all of these
30
#include "CString.h"
31
#include "EventNames.h"
32
#include "FileSystem.h"
33
#include "Frame.h"
34
#include "FrameTree.h"
35
#include "Page.h"
36
#include "PageGroup.h"
37
#include "StorageArea.h"
38
#include "StorageSyncManager.h"
39
#include <wtf/StdLibExtras.h>
40
41
namespace WebCore {
42
43
typedef HashMap<String, StorageNamespace*> LocalStorageNamespaceMap;
44
45
static LocalStorageNamespaceMap& localStorageNamespaceMap()
46
{
47
    DEFINE_STATIC_LOCAL(LocalStorageNamespaceMap, localStorageNamespaceMap, ());
48
    return localStorageNamespaceMap;
49
}
50
51
PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path)
52
{
53
    const String lookupPath = path.isNull() ? String("") : path;
54
    LocalStorageNamespaceMap::iterator it = localStorageNamespaceMap().find(lookupPath);
55
    if (it == localStorageNamespaceMap().end()) {
56
        RefPtr<StorageNamespace> storageNamespace = adoptRef(new StorageNamespace(LocalStorage, lookupPath));
57
        localStorageNamespaceMap().set(lookupPath, storageNamespace.get());
58
        return storageNamespace.release();
59
    }
60
    
61
    return it->second;
62
}
63
64
PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
65
{
66
    return adoptRef(new StorageNamespace(SessionStorage, String()));
67
}
68
69
StorageNamespace::StorageNamespace(StorageType storageType, const String& path)
70
    : m_storageType(storageType)
71
    , m_path(path.copy())  // FIXME: Is the .copy necessary?
72
    , m_syncManager(0)
73
#ifndef NDEBUG
74
    , m_isShutdown(false)
75
#endif
76
{
77
    if (m_storageType == LocalStorage && !m_path.isEmpty())
78
        m_syncManager = StorageSyncManager::create(m_path);
79
}
80
81
StorageNamespace::~StorageNamespace()
82
{
83
    ASSERT(isMainThread());
84
    
85
    if (m_storageType == LocalStorage) {
86
        ASSERT(localStorageNamespaceMap().get(m_path) == this);
87
        localStorageNamespaceMap().remove(m_path);
88
    }
89
}
90
91
PassRefPtr<StorageNamespace> StorageNamespace::copy()
92
{
93
    ASSERT(isMainThread());
94
    ASSERT(!m_isShutdown);
95
96
    RefPtr<StorageNamespace> newNamespace = adoptRef(new StorageNamespace(m_storageType, m_path));
97
98
    StorageAreaMap::iterator end = m_storageAreaMap.end();
99
    for (StorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i) {
100
        RefPtr<StorageArea> areaCopy = i->second->copy(i->first.get());
101
        newNamespace->m_storageAreaMap.set(i->first, areaCopy.release());
102
    }
103
    
104
    return newNamespace.release();
105
}
106
107
PassRefPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin* origin)
108
{
109
    ASSERT(isMainThread());
110
    ASSERT(!m_isShutdown);
111
112
    RefPtr<StorageArea> storageArea;
113
    if (storageArea = m_storageAreaMap.get(origin))
114
        return storageArea.release();
115
    
116
    storageArea = StorageArea::create(m_storageType, origin, m_syncManager);
117
    m_storageAreaMap.set(origin, storageArea);
118
    return storageArea.release();
119
}
120
121
void StorageNamespace::close()
122
{
123
    ASSERT(isMainThread());
124
    ASSERT(!m_isShutdown);
125
126
    StorageAreaMap::iterator end = m_storageAreaMap.end();
127
    for (StorageAreaMap::iterator it = m_storageAreaMap.begin(); it != end; ++it)
128
        it->second->close();
129
        
130
#ifndef NDEBUG
131
    m_isShutdown = true;
132
#endif
133
}
134
135
} // namespace WebCore
- a/WebCore/storage/StorageNamespace.h +70 lines
Line 0 a/WebCore/storage/StorageNamespace.h_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef StorageNamespace_h
27
#define StorageNamespace_h
28
29
#include "SecurityOriginHash.h"
30
#include "StorageArea.h"
31
32
#include <wtf/HashMap.h>
33
#include <wtf/RefCounted.h>
34
35
namespace WebCore {
36
37
    class StorageArea;
38
    class StorageSyncManager;
39
40
    class StorageNamespace : public RefCounted<StorageNamespace> {
41
    public:
42
        ~StorageNamespace();
43
44
        static PassRefPtr<StorageNamespace> sessionStorageNamespace();
45
        static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path);
46
47
        PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
48
        PassRefPtr<StorageNamespace> copy();
49
        void close();
50
51
    private:
52
        StorageNamespace(StorageType, const String& path);
53
54
        typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea>, SecurityOriginHash> StorageAreaMap;
55
        StorageAreaMap m_storageAreaMap;
56
57
        StorageType m_storageType;
58
                
59
        // Only used iff m_storageType == LocalStorage and we're persistent.
60
        String m_path;
61
        RefPtr<StorageSyncManager> m_syncManager;
62
        
63
#ifndef NDEBUG
64
        bool m_isShutdown;
65
#endif
66
    };
67
68
} // namespace WebCore
69
70
#endif // StorageNamespace_h

Return to Bug 25376