Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: chrome/common/component_flash_hint_file_linux.h

Issue 1261333004: Add support for Flash Player Component updates on Linux (Closed) Base URL:
Patch Set: Fix up bauerb's final few comments. Created 5 years, 4 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
Index: chrome/common/component_flash_hint_file_linux.h
diff --git a/chrome/common/component_flash_hint_file_linux.h b/chrome/common/component_flash_hint_file_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..abe0701ed86383516a4923ec9c5defcee8f1bd18
--- /dev/null
+++ b/chrome/common/component_flash_hint_file_linux.h
@@ -0,0 +1,52 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "build/build_config.h"
+#if defined(OS_LINUX)
+#include <string>
+namespace base {
+class FilePath;
+namespace chrome {
Lei Zhang 2015/08/14 22:37:07 We actually decided to stop using the chrome names
Greg K 2015/08/17 21:11:57 Done.
+// The APIs in this namespace wraps the component updated flash hint file, which
+// lives inside the PepperFlash folder of the user-data-dir, so that the Linux
+// zygote process can preload the right version of flash.
+namespace component_flash_hint_file {
+// Records a new flash update into the hint file.
+// |unpacked_plugin| is the current location of the plugin.
+// |moved_plugin| is the location where the plugin will be loaded from.
+bool RecordFlashUpdate(const base::FilePath& unpacked_plugin,
+ const base::FilePath& moved_plugin,
+ const std::string& version);
+// Reports whether or not a hints file exists.
+bool DoesHintFileExist();
+// Return the path of the component updated flash plugin, only if the file has
+// the correct hash sum.
+// |path| will be populated with the path to the flash plugin.
+// |version| will be populated with the version of the flash plugin.
+bool VerifyAndReturnFlashLocation(base::FilePath* path, std::string* version);
+// Test if the specified plugin file can be mapped executable.
+// This is useful to test if the flash plugin is in a directory mounted
+// noexec, in which case Chrome will not be able to load and use the plugin.
+// |path| is the path of the flash plugin that will mapped executable.
+bool TestExecutableMapping(const base::FilePath& path);
+} // namespace component_flash_hint_file
+} // namespace chrome
+#endif // defined(OS_LINUX)

Powered by Google App Engine
This is Rietveld 408576698