Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / component_flash_hint_file_linux.h
blob85694ce42843e1fbf4efccd86a29597b37707a6a
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.
5 #ifndef CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_
6 #define CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_
8 #include "build/build_config.h"
10 #if !defined(OS_LINUX)
11 #error "This file only applies to the Linux component update of Flash."
12 #endif // !defined(OS_LINUX)
14 #include <string>
16 namespace base {
17 class FilePath;
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 {
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);
32 // Reports whether or not a hints file exists.
33 bool DoesHintFileExist();
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);
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);
47 } // namespace component_flash_hint_file
49 #endif // CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_