Ignore:
Timestamp:
12/18/08 23:34:52 (6 years ago)
Author:
mitz@apple.com
Message:

WebCore:

Reviewed by Sam Weinig.

  • avoid using the ResourceHandle-level credential storage, if any, unless the client opts to use it; when use of the credential storage is disallowed, all authentication challenges are sent to the client.
  • let the FrameLoaderClient decide whether to use the credential storage.
  • loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::shouldUseCredentialStorage): Added. Returns false.
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldUseCredentialStorage): Added. Calls through to the FrameLoaderClient.
  • loader/FrameLoader.h: Declared shouldUseCredentialStorage().
  • loader/FrameLoaderClient.h: Declared shouldUseCredentialStorage().
  • loader/ResourceLoader.cpp: (WebCore::ResourceLoader::shouldUseCredentialStorage): Added. Calls through to the FrameLoader.
  • loader/ResourceLoader.h: (WebCore::ResourceLoader::shouldUseCredentialStorage): Implemented this ResourceHandleClient method.
  • loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::shouldUseCredentialStorage): Added. Overrides the ResourceLoader implementation by letting the client supply the return value. If the client does not do this, continues with the ResourceLoader behavior of asking the FrameLoader.
  • loader/SubresourceLoader.h: Removed an unused #include and declared shouldUseCredentialStorage().
  • loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::getShouldUseCredentialStorage): Added a default implementation which returns false, meaning the client does not wish to decide whether the credential storage should be used.
  • platform/network/ResourceHandle.h: Removed unused forward declarations. Declared a new member function, shouldUseCredentialStorage(), on Mac and CFNetwork-using builds.
  • platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::shouldUseCredentialStorage): Added this default implementation that returns false.
  • platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::findCFNetworkModule): Added. Returns a handle to the CFNetwork module. (WebCore::cfNetworkVersion): Added. Returns the high word of the CFNetwork library's product version. (WebCore::highestSupportedCFURLConnectionClientVersion): Added. Returns the highest version of the CFURLConnectionClient structure supported by the CFNetwork library. The only reason to check this at runtime is that WebKit may be linking at runtime against an older version of CFNetwork than the one it was built with, as is the case with nightly builds. (WebCore::shouldUseCredentialStorageCallback): Added this CFURLConnection callback which calls through to ResourceHandle::shouldUseCredentialStorage(). (WebCore::ResourceHandle::start): Pass a version 3 CFURLConnectionClient including the shouldUseCredentialStorage callback. At runtime, clamp the client structure version down to the highest supported by CFNetwork. (WebCore::ResourceHandle::shouldUseCredentialStorage): Added. Calls through to the client if there is one. Otherwise returns false.
  • platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto. (-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]): Added this delegate method which callls through to ResourceHandle::shouldUseCredentialStorage().

WebKit/gtk:

Reviewed by Sam Weinig.

  • stub out FrameLoaderClient::shouldUseCredentialStorage().
  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::shouldUseCredentialStorage):
  • WebCoreSupport/FrameLoaderClientGtk.h:

WebKit/mac:

Reviewed by Sam Weinig.

  • implement FrameLoaderClient::shouldUseCredentialStorage() by calling a new resource load delegae method.
  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the delegate method. If the method is unimplemented, returns true for backwards compatibility.
  • WebView/WebView.mm: (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the shouldUseCredentialStorageFunc member. (CallResourceLoadDelegateReturningBoolean): Added.
  • WebView/WebViewInternal.h:
  • WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method -webView:resource:shouldUseCredentialStorageForDataSource:.

WebKit/qt:

Reviewed by Sam Weinig.

  • stub out FrameLoaderClient::shouldUseCredentialStorage().
  • WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::shouldUseCredentialStorage):
  • WebCoreSupport/FrameLoaderClientQt.h:

WebKit/win:

Reviewed by Sam Weinig.

  • implement FrameLoaderClient::shouldUseCredentialStorage() by calling a new resource load delegae method.
  • Interfaces/IWebResourceLoadDelegatePrivate.idl: Added a ne interface, IWebResourceLoadDelegatePrivate2, including a new method, shouldUseCredentialStorage().
  • WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the delegate method. If the method is unimplemented, returns true for backwards compatibility.
  • WebCoreSupport/WebFrameLoaderClient.h:

WebKit/wx:

Reviewed by Sam Weinig.

  • stub out FrameLoaderClient::shouldUseCredentialStorage().
  • WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::shouldUseCredentialStorage):
  • WebKitSupport/FrameLoaderClientWx.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h

    r39385 r39393  
    5050 
    5151    virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse); 
     52    virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier); 
    5253    virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); 
    5354    virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); 
Note: See TracChangeset for help on using the changeset viewer.