diff options
author | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 03:07:10 +0000 |
---|---|---|
committer | yuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 03:07:10 +0000 |
commit | 27f45a237d7bb5dd2b4d1dfa57490bf8c122ec0c (patch) | |
tree | 3433161e5482e238437aea51c29941a788c83d7e /webkit/glue/webkit_glue.cc | |
parent | 71b54bf734283bb029f2b6a27c2f375cca8d357c (diff) | |
download | chromium_src-27f45a237d7bb5dd2b4d1dfa57490bf8c122ec0c.zip chromium_src-27f45a237d7bb5dd2b4d1dfa57490bf8c122ec0c.tar.gz chromium_src-27f45a237d7bb5dd2b4d1dfa57490bf8c122ec0c.tar.bz2 |
Fix UA Spoofing Condition for Linux.
Without this patch, headlines.yahoo.co.jp/videonews/* are erroneously
considered to require UA spoofing for Linux Chrome.
BUG=104426
TEST=none
Review URL: http://codereview.chromium.org/9114065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index e16b617..58d7223 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -405,6 +405,7 @@ bool IsMicrosoftSiteThatNeedsSpoofingForSilverlight(const GURL& url) { } bool IsYahooSiteThatNeedsSpoofingForSilverlight(const GURL& url) { +#if defined(OS_MACOSX) || defined(OS_WIN) // The following Yahoo! JAPAN pages erroneously judge that Silverlight does // not support Chromium. Until the pages are fixed, spoof the UA. // http://crbug.com/104426 @@ -412,6 +413,7 @@ bool IsYahooSiteThatNeedsSpoofingForSilverlight(const GURL& url) { StartsWithASCII(url.path(), "/videonews/", true)) { return true; } +#endif #if defined(OS_MACOSX) if ((url.host() == "downloads.yahoo.co.jp" && StartsWithASCII(url.path(), "/docs/silverlight/", true)) || @@ -450,6 +452,7 @@ const std::string& UserAgentState::Get(const GURL& url) const { webkit_glue::BuildOSCpuInfo().c_str()); #endif } + DCHECK(!user_agent_for_spoofing_hack_.empty()); return user_agent_for_spoofing_hack_; } } |