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

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

Issue 2130803003: Rearrange Flash component registration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep using chrome_content_client to load bundled Flash Created 4 years, 5 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 | chrome/common/chrome_content_client.cc » ('j') | 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 d98a23a3cdf3f7ac70df91fc4e152b33e39b9753..41d146a119e0689cefcfd3bbffe0b03e466451f7 100644
--- a/chrome/browser/component_updater/pepper_flash_component_installer.cc
+++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -105,6 +105,9 @@ bool IsPepperFlash(const content::WebPluginInfo& plugin) {
(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);
@@ -112,8 +115,6 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
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);
@@ -131,8 +132,6 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
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(),
@@ -145,11 +144,10 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
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 bundled, and not debug system.
+ // and the version of flash is not debug system.
if (registered_version.IsValid() &&
version.CompareTo(registered_version) == 0 &&
- (is_on_network || registered_is_bundled ||
- registered_is_debug_system)) {
+ (is_on_network || registered_is_debug_system)) {
return;
}
@@ -163,14 +161,8 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
PluginService::GetInstance()->RefreshPlugins();
}
-void NotifyPathServiceAndChrome(const base::FilePath& path,
- const Version& version) {
+void UpdatePathService(const base::FilePath& path) {
PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path);
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&RegisterPepperFlashWithChrome,
- path.Append(chrome::kPepperFlashPluginFilename),
- version));
}
#endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
@@ -236,8 +228,10 @@ void FlashComponentInstallerTraits::ComponentReady(
// 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.Append(chrome::kPepperFlashPluginFilename),
+ version);
BrowserThread::GetBlockingPool()->PostTask(
- FROM_HERE, base::Bind(&NotifyPathServiceAndChrome, path, version));
+ FROM_HERE, base::Bind(&UpdatePathService, path));
#endif // !defined(OS_LINUX)
}
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698