예제 #1
0
String standardUserAgentForURL(const URL& url)
{
    ASSERT(!url.isNull());
    UserAgentQuirks quirks;
    if (url.host().endsWith(".yahoo.com")) {
        // www.yahoo.com redirects to the mobile version when Linux is present in the UA,
        // use always Macintosh as platform. See https://bugs.webkit.org/show_bug.cgi?id=125444.
        quirks.add(UserAgentQuirks::NeedsMacintoshPlatform);
    }

    // The null string means we don't need a specific UA for the given URL.
    return quirks.isEmpty() ? String() : buildUserAgentString(quirks);
}
예제 #2
0
String standardUserAgentForURL(const URL& url)
{
    auto quirks = UserAgentQuirks::quirksForURL(url);
    // The null string means we don't need a specific UA for the given URL.
    return quirks.isEmpty() ? String() : buildUserAgentString(quirks);
}