Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4026)

Unified Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 12218125: Only register component-updated Flash if it is newer than the bundled one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/pepper_flash_component_installer.cc
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc
index 93135c4b0b15c48b85063620dd823dc7bc2dd5dc..7232e454efa41f873a5063cd5640ea7e09a69361 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -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;
cpu_(ooo_6.6-7.5) 2013/02/12 22:18:17 why not registered_version.IsOlderThan(version)
yzshen1 2013/02/12 22:27:19 That is because IsOlderThan() receives a string, s
+ }
// If the version is newer, remove the old one first.
PluginService::GetInstance()->UnregisterInternalPlugin(it->path);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698