Commit 93db81de authored by paroga@webkit.org's avatar paroga@webkit.org

2011-03-27 Patrick Gansterer <paroga@webkit.org>

        Reviewed by Andreas Kling.

        [WINCE] Use a appropriate user agent string
        https://bugs.webkit.org/show_bug.cgi?id=57175

        * WebCoreSupport/FrameLoaderClientWinCE.cpp:
        (WebKit::FrameLoaderClientWinCE::userAgent):

git-svn-id: svn://svn.chromium.org/blink/trunk@82070 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5516cb31
2011-03-27 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Use a appropriate user agent string
https://bugs.webkit.org/show_bug.cgi?id=57175
* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::userAgent):
2011-03-26 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix.
......
......@@ -36,7 +36,10 @@
#include "Page.h"
#include "PluginDatabase.h"
#include "RenderPart.h"
#include "SystemInfo.h"
#include "WebKitVersion.h"
#include "WebView.h"
#include <wtf/text/StringConcatenate.h>
using namespace WebCore;
......@@ -55,7 +58,14 @@ FrameLoaderClientWinCE::~FrameLoaderClientWinCE()
String FrameLoaderClientWinCE::userAgent(const KURL&)
{
return "WebKitWinCE";
DEFINE_STATIC_LOCAL(String, userAgentString, ());
if (userAgentString.isNull()) {
String webKitVersion = String::format("%d.%d", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
userAgentString = makeString("Mozilla/5.0 (", windowsVersionForUAString(), ") AppleWebKit/", webKitVersion, " (KHTML, like Gecko) Mobile Safari/", webKitVersion);
}
return userAgentString;
}
PassRefPtr<DocumentLoader> FrameLoaderClientWinCE::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment