Skip to content

Commit

Permalink
Only register component-updated Flash if it is newer than the bundled…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
yzshen@chromium.org committed Feb 13, 2013
1 parent d1e89f0 commit 182d98d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 182d98d

Please sign in to comment.