Changeset 52406 in webkit
- Timestamp:
- Dec 20, 2009 1:52:52 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52403 r52406 1 2009-12-20 Andrei Popescu <andreip@google.com> 2 3 Reviewed by Adam Barth. 4 5 [Android] Android needs implementation of setCookies, cookies and cookiesEnabled functions. 6 https://bugs.webkit.org/show_bug.cgi?id=32559 7 8 Add implementation of the cookie functions. 9 Fix a crash caused by dereferencing a 0 MainResourceLoader pointer 10 in ResourceHandle::start(). 11 12 No new tests, this is platform code. 13 14 * platform/android/PlatformBridge.h: 15 * platform/network/android/AuthenticationChallenge.h: Added. 16 * platform/network/android/CookieJarAndroid.cpp: Added. 17 (WebCore::setCookies): 18 (WebCore::cookies): 19 (WebCore::cookiesEnabled): 20 * platform/network/android/ResourceHandleAndroid.cpp: 21 (WebCore::ResourceHandle::start): 22 1 23 2009-12-19 Eric Seidel <eric@webkit.org> 2 24 -
trunk/WebCore/platform/android/PlatformBridge.h
r51384 r52406 49 49 static WTF::Vector<String> getSupportedKeyStrengthList(); 50 50 static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&); 51 // Cookies 52 static void setCookies(const KURL&, const String& value); 53 static String cookies(const KURL&); 54 static bool cookiesEnabled(); 51 55 }; 56 52 57 } 53 58 #endif // PlatformBridge_h -
trunk/WebCore/platform/network/android/AuthenticationChallenge.h
r52404 r52406 1 1 /* 2 2 * Copyright 2009, The Android Open Source Project 3 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #ifndef PlatformBridge_h27 #define PlatformBridge_h27 #ifndef AuthenticationChallenge_h 28 #define AuthenticationChallenge_h 28 29 29 #include "KURL.h" 30 #include "PlatformString.h" 31 32 #include <wtf/Vector.h> 30 #include "AuthenticationChallengeBase.h" 33 31 34 32 namespace WebCore { 35 33 36 // An interface to the embedding layer, which has the ability to answer 37 // questions about the system and so on... 38 // This is very similar to ChromiumBridge and the two are likely to converge 39 // in the future. 40 // 41 // The methods in this class all need to reach across a JNI layer to the Java VM 42 // where the embedder runs. The JNI machinery is currently all in WebKit/android 43 // but the long term plan is to move to the WebKit API and share the bridge and its 44 // implementation with Chromium. The JNI machinery will then move outside of WebKit, 45 // similarly to how Chromium's IPC layer lives outside of WebKit. 46 class PlatformBridge { 47 public: 48 // KeyGenerator 49 static WTF::Vector<String> getSupportedKeyStrengthList(); 50 static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&); 34 class AuthenticationChallenge : public AuthenticationChallengeBase { 51 35 }; 36 52 37 } 53 #endif // PlatformBridge_h 38 39 #endif -
trunk/WebCore/platform/network/android/CookieJarAndroid.cpp
r52404 r52406 1 1 /* 2 * Copyright 200 9, The Android Open Source Project2 * Copyright 2007, The Android Open Source Project 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef PlatformBridge_h 27 #define PlatformBridge_h 26 #include "config.h" 28 27 29 #include "KURL.h" 30 #include "PlatformString.h" 28 #include "CookieJar.h" 31 29 32 #include <wtf/Vector.h>30 #include "PlatformBridge.h" 33 31 34 32 namespace WebCore { 35 33 36 // An interface to the embedding layer, which has the ability to answer 37 // questions about the system and so on... 38 // This is very similar to ChromiumBridge and the two are likely to converge 39 // in the future. 40 // 41 // The methods in this class all need to reach across a JNI layer to the Java VM 42 // where the embedder runs. The JNI machinery is currently all in WebKit/android 43 // but the long term plan is to move to the WebKit API and share the bridge and its 44 // implementation with Chromium. The JNI machinery will then move outside of WebKit, 45 // similarly to how Chromium's IPC layer lives outside of WebKit. 46 class PlatformBridge { 47 public: 48 // KeyGenerator 49 static WTF::Vector<String> getSupportedKeyStrengthList(); 50 static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&); 51 }; 34 void setCookies(Document*, const KURL& url, const String& value) 35 { 36 PlatformBridge::setCookies(url, value); 52 37 } 53 #endif // PlatformBridge_h 38 39 String cookies(const Document*, const KURL& url) 40 { 41 return PlatformBridge::cookies(url); 42 } 43 44 bool cookiesEnabled(const Document*) 45 { 46 return PlatformBridge::cookiesEnabled(); 47 } 48 49 } -
trunk/WebCore/platform/network/android/ResourceHandleAndroid.cpp
r52123 r52406 53 53 DocumentLoader* docLoader = frame->loader()->activeDocumentLoader(); 54 54 MainResourceLoader* mainLoader = docLoader->mainResourceLoader(); 55 bool isMainResource = (mainLoader->handle() == this);55 bool isMainResource = mainLoader && (mainLoader->handle() == this); 56 56 57 57 PassRefPtr<ResourceLoaderAndroid> loader = ResourceLoaderAndroid::start(this, d->m_request, frame->loader()->client(), isMainResource, false);
Note: See TracChangeset
for help on using the changeset viewer.