Changeset 171722 in webkit
- Timestamp:
- Jul 28, 2014 9:22:14 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r171540 r171722 2209 2209 platform/network/BlobRegistryImpl.cpp 2210 2210 platform/network/BlobResourceHandle.cpp 2211 platform/network/Credential .cpp2211 platform/network/CredentialBase.cpp 2212 2212 platform/network/CredentialStorage.cpp 2213 2213 platform/network/DNSResolveQueue.cpp -
trunk/Source/WebCore/ChangeLog
r171718 r171722 1 2014-07-28 Dan Bernstein <mitz@apple.com> 2 3 Introduced CredentialBase and made Credential derive from it 4 Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327 5 6 Reviewed by Darin Adler. 7 8 No change in functionality. 9 10 * CMakeLists.txt: Updated for source file rename. 11 12 * WebCore.exp.in: Changed to export CredentialBase symbols. 13 14 * WebCore.vcxproj/WebCore.vcxproj: Updated for source file rename and new header. 15 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto. 16 17 * WebCore.xcodeproj/project.pbxproj: Ditto. 18 19 * platform/network/Credential.cpp: Renamed to CredentialBase.cpp. 20 21 * platform/network/Credential.h: Defined Credential to derive from CredentialBase. 22 23 * platform/network/CredentialBase.cpp: Renamed Credential.cpp to this. Updated for the new 24 name. 25 26 * platform/network/CredentialBase.h: Copied from Credential.h, renamed the class to 27 CredentialBase, and made the constructors protected. 28 1 29 2014-07-28 Zalan Bujtas <zalan@apple.com> 2 30 -
trunk/Source/WebCore/WebCore.exp.in
r171615 r171722 72 72 __ZN7WebCore10ClientRectC1ERKNS_9FloatRectE 73 73 __ZN7WebCore10ClientRectC1Ev 74 __ZN7WebCore10CredentialC1ERKN3WTF6StringES4_NS_21CredentialPersistenceE75 __ZN7WebCore10CredentialC1Ev76 74 __ZN7WebCore10FloatPointC1ERK7CGPoint 77 75 __ZN7WebCore10FloatPointC1ERKNS_8IntPointE … … 337 335 __ZN7WebCore14ClientRectListC1Ev 338 336 __ZN7WebCore14ClientRectListD1Ev 337 __ZN7WebCore14CredentialBaseC2EP20OpaqueSecIdentityRefPK9__CFArrayNS_21CredentialPersistenceE 338 __ZN7WebCore14CredentialBaseC2ERKN3WTF6StringES4_NS_21CredentialPersistenceE 339 __ZN7WebCore14CredentialBaseC2Ev 339 340 __ZN7WebCore14DocumentLoader10commitDataEPKcm 340 341 __ZN7WebCore14DocumentLoader12dataReceivedEPNS_14CachedResourceEPKci … … 1535 1536 __ZNK3JSC8Bindings10RootObject12globalObjectEv 1536 1537 __ZNK3WTF6String14createCFStringEv 1537 __ZNK7WebCore10Credential11hasPasswordEv1538 __ZNK7WebCore10Credential11persistenceEv1539 __ZNK7WebCore10Credential12certificatesEv1540 __ZNK7WebCore10Credential4typeEv1541 __ZNK7WebCore10Credential4userEv1542 __ZNK7WebCore10Credential7isEmptyEv1543 __ZNK7WebCore10Credential8identityEv1544 __ZNK7WebCore10Credential8passwordEv1545 1538 __ZNK7WebCore10FloatPointcv7CGPointEv 1546 1539 __ZNK7WebCore10FontGlyphs17realizeFontDataAtERKNS_15FontDescriptionEj … … 1660 1653 __ZNK7WebCore13ResourceError7nsErrorEv 1661 1654 __ZNK7WebCore13ResourceErrorcvP7NSErrorEv 1655 __ZNK7WebCore14CredentialBase11hasPasswordEv 1656 __ZNK7WebCore14CredentialBase11persistenceEv 1657 __ZNK7WebCore14CredentialBase12certificatesEv 1658 __ZNK7WebCore14CredentialBase4typeEv 1659 __ZNK7WebCore14CredentialBase4userEv 1660 __ZNK7WebCore14CredentialBase7isEmptyEv 1661 __ZNK7WebCore14CredentialBase8identityEv 1662 __ZNK7WebCore14CredentialBase8passwordEv 1662 1663 __ZNK7WebCore14DocumentLoader10requestURLEv 1663 1664 __ZNK7WebCore14DocumentLoader11frameLoaderEv … … 2220 2221 .objc_class_name_WebWindowFadeAnimation 2221 2222 .objc_class_name_WebWindowScaleAnimation 2222 __ZN7WebCore10CredentialC1EP20OpaqueSecIdentityRefPK9__CFArrayNS_21CredentialPersistenceE2223 2223 __ZN7WebCore10FloatPointC1ERK8_NSPoint 2224 2224 __ZN7WebCore10handCursorEv -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r171540 r171722 8533 8533 <ClCompile Include="..\platform\network\BlobRegistry.cpp" /> 8534 8534 <ClCompile Include="..\platform\network\BlobRegistryImpl.cpp" /> 8535 <ClCompile Include="..\platform\network\Credential .cpp" />8535 <ClCompile Include="..\platform\network\CredentialBase.cpp" /> 8536 8536 <ClCompile Include="..\platform\network\CredentialStorage.cpp" /> 8537 8537 <ClCompile Include="..\platform\network\DataURL.cpp" /> … … 19765 19765 <ClInclude Include="..\platform\network\CookieStorage.h" /> 19766 19766 <ClInclude Include="..\platform\network\Credential.h" /> 19767 <ClInclude Include="..\platform\network\CredentialBase.h" /> 19767 19768 <ClInclude Include="..\platform\network\CredentialStorage.h" /> 19768 19769 <ClInclude Include="..\platform\network\DataURL.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r171540 r171722 1792 1792 <Filter>platform\network</Filter> 1793 1793 </ClCompile> 1794 <ClCompile Include="..\platform\network\Credential .cpp">1794 <ClCompile Include="..\platform\network\CredentialBase.cpp"> 1795 1795 <Filter>platform\network</Filter> 1796 1796 </ClCompile> … … 8807 8807 </ClInclude> 8808 8808 <ClInclude Include="..\platform\network\Credential.h"> 8809 <Filter>platform\network</Filter> 8810 </ClInclude> 8811 <ClInclude Include="..\platform\network\CredentialBase.h"> 8809 8812 <Filter>platform\network</Filter> 8810 8813 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r171690 r171722 1314 1314 37919C230B7D188600A56998 /* PositionIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37919C210B7D188600A56998 /* PositionIterator.cpp */; }; 1315 1315 37919C240B7D188600A56998 /* PositionIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 37919C220B7D188600A56998 /* PositionIterator.h */; settings = {ATTRIBUTES = (); }; }; 1316 3792917A1985EF3900F4B661 /* CredentialBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 379291781985EF3900F4B661 /* CredentialBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1316 1317 379919961200DDF400EA041C /* WOFFFileFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 379919941200DDF400EA041C /* WOFFFileFormat.cpp */; }; 1317 1318 379919971200DDF400EA041C /* WOFFFileFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 379919951200DDF400EA041C /* WOFFFileFormat.h */; }; … … 1859 1860 514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */; }; 1860 1861 514C76550CE9234F007EF3CD /* ResourceResponseMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C764B0CE9234E007EF3CD /* ResourceResponseMac.mm */; }; 1861 514C766D0CE923A1007EF3CD /* Credential .cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76580CE923A1007EF3CD /* Credential.cpp */; };1862 514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76580CE923A1007EF3CD /* CredentialBase.cpp */; }; 1862 1863 514C766E0CE923A1007EF3CD /* Credential.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76590CE923A1007EF3CD /* Credential.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1863 1864 514C766F0CE923A1007EF3CD /* FormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765A0CE923A1007EF3CD /* FormData.cpp */; }; … … 8338 8339 37919C210B7D188600A56998 /* PositionIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PositionIterator.cpp; sourceTree = "<group>"; }; 8339 8340 37919C220B7D188600A56998 /* PositionIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PositionIterator.h; sourceTree = "<group>"; }; 8341 379291781985EF3900F4B661 /* CredentialBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CredentialBase.h; sourceTree = "<group>"; }; 8340 8342 379919941200DDF400EA041C /* WOFFFileFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WOFFFileFormat.cpp; sourceTree = "<group>"; }; 8341 8343 379919951200DDF400EA041C /* WOFFFileFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WOFFFileFormat.h; sourceTree = "<group>"; }; … … 8946 8948 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestMac.mm; sourceTree = "<group>"; }; 8947 8949 514C764B0CE9234E007EF3CD /* ResourceResponseMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceResponseMac.mm; sourceTree = "<group>"; }; 8948 514C76580CE923A1007EF3CD /* Credential .cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Credential.cpp; sourceTree = "<group>"; };8950 514C76580CE923A1007EF3CD /* CredentialBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CredentialBase.cpp; sourceTree = "<group>"; }; 8949 8951 514C76590CE923A1007EF3CD /* Credential.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Credential.h; sourceTree = "<group>"; }; 8950 8952 514C765A0CE923A1007EF3CD /* FormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormData.cpp; sourceTree = "<group>"; }; … … 16330 16332 2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */, 16331 16333 E13F01EA1270E10D00DFBA71 /* CookieStorage.h */, 16332 514C76580CE923A1007EF3CD /* Credential.cpp */,16333 16334 514C76590CE923A1007EF3CD /* Credential.h */, 16335 514C76580CE923A1007EF3CD /* CredentialBase.cpp */, 16336 379291781985EF3900F4B661 /* CredentialBase.h */, 16334 16337 51A052321058774F00CC9E95 /* CredentialStorage.cpp */, 16335 16338 51A052311058774F00CC9E95 /* CredentialStorage.h */, … … 24160 24163 A7CFB3D20B7ED10A0070C32D /* DragImage.h in Headers */, 24161 24164 81F65FF613788FAA00FF6F2D /* DragState.h in Headers */, 24165 3792917A1985EF3900F4B661 /* CredentialBase.h in Headers */, 24162 24166 498770DC1242C535002226BA /* DrawingBuffer.h in Headers */, 24163 24167 E1BA66F11742BD8600C20251 /* DynamicLinkerInterposing.h in Headers */, … … 27283 27287 9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */, 27284 27288 D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */, 27285 514C766D0CE923A1007EF3CD /* Credential .cpp in Sources */,27289 514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */, 27286 27290 51A052341058774F00CC9E95 /* CredentialStorage.cpp in Sources */, 27287 27291 7EE6846512D26E3800E79415 /* CredentialStorageCFNet.cpp in Sources */, -
trunk/Source/WebCore/platform/network/Credential.h
r165676 r171722 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 #ifndef Credential_h 26 27 #define Credential_h 27 28 28 #include <wtf/text/WTFString.h> 29 30 #define CERTIFICATE_CREDENTIALS_SUPPORTED (PLATFORM(COCOA)) 31 32 #if CERTIFICATE_CREDENTIALS_SUPPORTED 33 #include <Security/SecBase.h> 34 #include <wtf/RetainPtr.h> 35 #endif 29 #include "CredentialBase.h" 36 30 37 31 namespace WebCore { 38 32 39 enum CredentialPersistence { 40 CredentialPersistenceNone, 41 CredentialPersistenceForSession, 42 CredentialPersistencePermanent 43 }; 33 class Credential : public CredentialBase { 34 public: 35 Credential() 36 : CredentialBase() 37 { 38 } 39 40 Credential(const String& user, const String& password, CredentialPersistence persistence) 41 : CredentialBase(user, password, persistence) 42 { 43 } 44 45 Credential(const Credential& original, CredentialPersistence persistence) 46 : CredentialBase(original, persistence) 47 { 48 } 44 49 45 50 #if CERTIFICATE_CREDENTIALS_SUPPORTED 46 enum CredentialType { 47 CredentialTypePassword, 48 CredentialTypeClientCertificate 49 }; 50 #endif 51 52 class Credential { 53 54 public: 55 Credential(); 56 Credential(const String& user, const String& password, CredentialPersistence); 57 Credential(const Credential& original, CredentialPersistence); 58 #if CERTIFICATE_CREDENTIALS_SUPPORTED 59 Credential(SecIdentityRef identity, CFArrayRef certificates, CredentialPersistence); 60 #endif 61 62 bool isEmpty() const; 63 64 const String& user() const; 65 const String& password() const; 66 bool hasPassword() const; 67 CredentialPersistence persistence() const; 68 69 #if CERTIFICATE_CREDENTIALS_SUPPORTED 70 SecIdentityRef identity() const; 71 CFArrayRef certificates() const; 72 CredentialType type() const; 73 #endif 74 75 private: 76 String m_user; 77 String m_password; 78 CredentialPersistence m_persistence; 79 #if CERTIFICATE_CREDENTIALS_SUPPORTED 80 RetainPtr<SecIdentityRef> m_identity; 81 RetainPtr<CFArrayRef> m_certificates; 82 CredentialType m_type; 51 Credential(SecIdentityRef identity, CFArrayRef certificates, CredentialPersistence persistence) 52 : CredentialBase(identity, certificates, persistence) 53 { 54 } 83 55 #endif 84 56 }; 85 57 86 bool operator==(const Credential& a, const Credential& b); 87 inline bool operator!=(const Credential& a, const Credential& b) { return !(a == b); } 88 89 }; 90 #endif 58 } 59 60 #endif // Credential_h -
trunk/Source/WebCore/platform/network/CredentialBase.cpp
r171719 r171722 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 #include "config.h" 27 #include "CredentialBase.h" 28 26 29 #include "Credential.h" 27 30 … … 30 33 // Need to enforce empty, non-null strings due to the pickiness of the String == String operator 31 34 // combined with the semantics of the String(NSString*) constructor 32 Credential ::Credential()35 CredentialBase::CredentialBase() 33 36 : m_user("") 34 37 , m_password("") … … 42 45 // Need to enforce empty, non-null strings due to the pickiness of the String == String operator 43 46 // combined with the semantics of the String(NSString*) constructor 44 Credential ::Credential(const String& user, const String& password, CredentialPersistence persistence)47 CredentialBase::CredentialBase(const String& user, const String& password, CredentialPersistence persistence) 45 48 : m_user(user.length() ? user : "") 46 49 , m_password(password.length() ? password : "") … … 52 55 } 53 56 54 Credential ::Credential(const Credential& original, CredentialPersistence persistence)57 CredentialBase::CredentialBase(const Credential& original, CredentialPersistence persistence) 55 58 : m_user(original.user()) 56 59 , m_password(original.password()) … … 64 67 } 65 68 66 bool Credential ::isEmpty() const69 bool CredentialBase::isEmpty() const 67 70 { 68 71 #if CERTIFICATE_CREDENTIALS_SUPPORTED … … 74 77 } 75 78 76 const String& Credential ::user() const79 const String& CredentialBase::user() const 77 80 { 78 81 return m_user; 79 82 } 80 83 81 const String& Credential ::password() const84 const String& CredentialBase::password() const 82 85 { 83 86 return m_password; 84 87 } 85 88 86 bool Credential ::hasPassword() const89 bool CredentialBase::hasPassword() const 87 90 { 88 91 return !m_password.isEmpty(); 89 92 } 90 93 91 CredentialPersistence Credential ::persistence() const94 CredentialPersistence CredentialBase::persistence() const 92 95 { 93 96 return m_persistence; … … 95 98 96 99 #if CERTIFICATE_CREDENTIALS_SUPPORTED 97 Credential ::Credential(SecIdentityRef identity, CFArrayRef certificates, CredentialPersistence persistence)100 CredentialBase::CredentialBase(SecIdentityRef identity, CFArrayRef certificates, CredentialPersistence persistence) 98 101 : m_user("") 99 102 , m_password("") … … 105 108 } 106 109 107 SecIdentityRef Credential ::identity() const110 SecIdentityRef CredentialBase::identity() const 108 111 { 109 112 return m_identity.get(); 110 113 } 111 114 112 CFArrayRef Credential ::certificates() const115 CFArrayRef CredentialBase::certificates() const 113 116 { 114 117 return m_certificates.get(); 115 118 } 116 119 117 CredentialType Credential ::type() const120 CredentialType CredentialBase::type() const 118 121 { 119 122 return m_type; … … 160 163 161 164 } 162 -
trunk/Source/WebCore/platform/network/CredentialBase.h
r171719 r171722 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 #ifndef Credential_h 26 #define Credential_h 25 26 #ifndef CredentialBase_h 27 #define CredentialBase_h 27 28 28 29 #include <wtf/text/WTFString.h> … … 36 37 37 38 namespace WebCore { 39 40 class Credential; 38 41 39 42 enum CredentialPersistence { … … 50 53 #endif 51 54 52 class Credential {55 class CredentialBase { 53 56 54 57 public: 55 Credential();56 Credential(const String& user, const String& password, CredentialPersistence);57 Credential(const Credential& original, CredentialPersistence);58 #if CERTIFICATE_CREDENTIALS_SUPPORTED59 Credential(SecIdentityRef identity, CFArrayRef certificates, CredentialPersistence);60 #endif61 62 58 bool isEmpty() const; 63 59 … … 72 68 CredentialType type() const; 73 69 #endif 70 71 protected: 72 CredentialBase(); 73 CredentialBase(const String& user, const String& password, CredentialPersistence); 74 CredentialBase(const Credential& original, CredentialPersistence); 75 #if CERTIFICATE_CREDENTIALS_SUPPORTED 76 CredentialBase(SecIdentityRef, CFArrayRef certificates, CredentialPersistence); 77 #endif 74 78 75 79 private:
Note: See TracChangeset
for help on using the changeset viewer.