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 ff934b2df20a783e37aaace4ee59b4ead5f290b2..72b0cb210f4ee391dcb444431c5f0147d57d23b8 100644 |
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc |
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc |
@@ -105,9 +105,6 @@ |
(plugin.pepper_permissions & ppapi::PERMISSION_FLASH); |
} |
-// |path| is the path to the latest Chrome-managed Flash installation (bundled |
-// or component updated). |
-// |version| is the version of that Flash implementation. |
void RegisterPepperFlashWithChrome(const base::FilePath& path, |
const Version& version) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
@@ -115,6 +112,8 @@ |
if (!MakePepperFlashPluginInfo(path, version, true, &plugin_info)) |
return; |
+ base::FilePath bundled_flash_dir; |
+ PathService::Get(chrome::DIR_PEPPER_FLASH_PLUGIN, &bundled_flash_dir); |
base::FilePath system_flash_path; |
PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, &system_flash_path); |
@@ -132,6 +131,8 @@ |
return; |
} |
+ bool registered_is_bundled = |
+ !bundled_flash_dir.empty() && bundled_flash_dir.IsParent(plugin.path); |
bool registered_is_debug_system = |
!system_flash_path.empty() && |
base::FilePath::CompareEqualIgnoreCase(plugin.path.value(), |
@@ -144,10 +145,11 @@ |
is_on_network = base::IsOnNetworkDrive(path); |
#endif |
// If equal version, register iff component is not on a network drive, |
- // and the version of flash is not debug system. |
+ // and the version of flash is not bundled, and not debug system. |
if (registered_version.IsValid() && |
version.CompareTo(registered_version) == 0 && |
- (is_on_network || registered_is_debug_system)) { |
+ (is_on_network || registered_is_bundled || |
+ registered_is_debug_system)) { |
return; |
} |
@@ -161,8 +163,12 @@ |
PluginService::GetInstance()->RefreshPlugins(); |
} |
-void UpdatePathService(const base::FilePath& path) { |
+void NotifyPathServiceAndChrome(const base::FilePath& path, |
+ const Version& version) { |
PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); |
+ BrowserThread::PostTask( |
+ BrowserThread::UI, FROM_HERE, |
+ base::Bind(&RegisterPepperFlashWithChrome, path, version)); |
} |
#endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) |
@@ -228,9 +234,8 @@ |
// Installation is done. Now tell the rest of chrome. Both the path service |
// and to the plugin service. On Linux, a restart is required to use the new |
// Flash version, so we do not do this. |
- RegisterPepperFlashWithChrome(path, version); |
BrowserThread::GetBlockingPool()->PostTask( |
- FROM_HERE, base::Bind(&UpdatePathService, path)); |
+ FROM_HERE, base::Bind(&NotifyPathServiceAndChrome, path, version)); |
#endif // !defined(OS_LINUX) |
} |