OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
Bernhard Bauer
2015/08/14 07:55:12
Remove this?
Greg K
2015/08/17 21:11:56
Done.
| |
5 #ifndef CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_H_ | |
6 #define CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_H_ | |
7 | |
8 #include "build/build_config.h" | |
9 | |
10 #if defined(OS_LINUX) | |
11 | |
12 #include <string> | |
13 | |
14 namespace base { | |
15 class FilePath; | |
16 } | |
17 | |
18 namespace chrome { | |
19 | |
20 // The APIs in this namespace wraps the component updated flash hint file, which | |
21 // lives inside the PepperFlash folder of the user-data-dir, so that the Linux | |
22 // zygote process can preload the right version of flash. | |
23 namespace component_flash_hint_file { | |
24 | |
25 // Records a new flash update into the hint file. | |
26 // |unpacked_plugin| is the current location of the plugin. | |
27 // |moved_plugin| is the location where the plugin will be loaded from. | |
28 bool RecordFlashUpdate(const base::FilePath& unpacked_plugin, | |
29 const base::FilePath& moved_plugin, | |
30 const std::string& version); | |
31 | |
32 // Reports whether or not a hints file exists. | |
33 bool DoesHintFileExist(); | |
34 | |
35 // Return the path of the component updated flash plugin, only if the file has | |
36 // the correct hash sum. | |
37 // |path| will be populated with the path to the flash plugin. | |
38 // |version| will be populated with the version of the flash plugin. | |
39 bool VerifyAndReturnFlashLocation(base::FilePath* path, std::string* version); | |
40 | |
41 // Test if the specified plugin file can be mapped executable. | |
42 // This is useful to test if the flash plugin is in a directory mounted | |
43 // noexec, in which case Chrome will not be able to load and use the plugin. | |
44 // |path| is the path of the flash plugin that will mapped executable. | |
45 bool TestExecutableMapping(const base::FilePath& path); | |
46 | |
47 } // namespace component_flash_hint_file | |
48 | |
49 } // namespace chrome | |
50 | |
51 #endif // defined(OS_LINUX) | |
52 #endif // CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_H_ | |
OLD | NEW |