Commit 182d98d7 authored by yzshen@chromium.org's avatar yzshen@chromium.org

Only register component-updated Flash if it is newer than the bundled one.

Previously, if the component-updated Flash was the same version as the
bundled one, the component-updated one took precedence.

BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/12218125

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182251 0039d316-1c4b-4281-b951-d872f2087c98
parent d1e89f02
......@@ -188,10 +188,12 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
if (!IsPepperFlash(*it))
continue;
// If the version we're trying to register is older than the existing one,
// don't do it.
if (version.IsOlderThan(UTF16ToUTF8(it->version)))
// Do it only if the version we're trying to register is newer.
Version registered_version(UTF16ToUTF8(it->version));
if (registered_version.IsValid() &&
version.CompareTo(registered_version) <= 0) {
return;
}
// If the version is newer, remove the old one first.
PluginService::GetInstance()->UnregisterInternalPlugin(it->path);
......
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