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, ...@@ -188,10 +188,12 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
if (!IsPepperFlash(*it)) if (!IsPepperFlash(*it))
continue; continue;
// If the version we're trying to register is older than the existing one, // Do it only if the version we're trying to register is newer.
// don't do it. Version registered_version(UTF16ToUTF8(it->version));
if (version.IsOlderThan(UTF16ToUTF8(it->version))) if (registered_version.IsValid() &&
version.CompareTo(registered_version) <= 0) {
return; return;
}
// If the version is newer, remove the old one first. // If the version is newer, remove the old one first.
PluginService::GetInstance()->UnregisterInternalPlugin(it->path); 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