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

Side by Side Diff: chrome/common/component_flash_hint_file_linux.h

Issue 1298013002: Address some additional cleanup work needed for the component flash updates on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove useless GetPepperFlashBaseDirectory() wrapper 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 unified diff | Download patch
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/component_flash_hint_file_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_ 5 #ifndef CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_
6 #define CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_ 6 #define CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_LINUX) 10 #if !defined(OS_LINUX)
11 #error "This file only applies to the Linux component update of Flash."
12 #endif // !defined(OS_LINUX)
11 13
12 #include <string> 14 #include <string>
13 15
14 namespace base { 16 namespace base {
15 class FilePath; 17 class FilePath;
16 } 18 }
17 19
18 namespace chrome {
19
20 // The APIs in this namespace wraps the component updated flash hint file, which 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 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. 22 // zygote process can preload the right version of flash.
23 namespace component_flash_hint_file { 23 namespace component_flash_hint_file {
24 24
25 // Records a new flash update into the hint file. 25 // Records a new flash update into the hint file.
26 // |unpacked_plugin| is the current location of the plugin. 26 // |unpacked_plugin| is the current location of the plugin.
27 // |moved_plugin| is the location where the plugin will be loaded from. 27 // |moved_plugin| is the location where the plugin will be loaded from.
28 bool RecordFlashUpdate(const base::FilePath& unpacked_plugin, 28 bool RecordFlashUpdate(const base::FilePath& unpacked_plugin,
29 const base::FilePath& moved_plugin, 29 const base::FilePath& moved_plugin,
30 const std::string& version); 30 const std::string& version);
31 31
32 // Reports whether or not a hints file exists. 32 // Reports whether or not a hints file exists.
33 bool DoesHintFileExist(); 33 bool DoesHintFileExist();
34 34
35 // Return the path of the component updated flash plugin, only if the file has 35 // Return the path of the component updated flash plugin, only if the file has
36 // the correct hash sum. 36 // the correct hash sum.
37 // |path| will be populated with the path to the flash plugin. 37 // |path| will be populated with the path to the flash plugin.
38 // |version| will be populated with the version of the flash plugin. 38 // |version| will be populated with the version of the flash plugin.
39 bool VerifyAndReturnFlashLocation(base::FilePath* path, std::string* version); 39 bool VerifyAndReturnFlashLocation(base::FilePath* path, std::string* version);
40 40
41 // Test if the specified plugin file can be mapped executable. 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 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. 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. 44 // |path| is the path of the flash plugin that will mapped executable.
45 bool TestExecutableMapping(const base::FilePath& path); 45 bool TestExecutableMapping(const base::FilePath& path);
46 46
47 } // namespace component_flash_hint_file 47 } // namespace component_flash_hint_file
48 48
49 } // namespace chrome
50
51 #endif // defined(OS_LINUX)
52 #endif // CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_ 49 #endif // CHROME_COMMON_COMPONENT_FLASH_HINT_FILE_LINUX_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/component_flash_hint_file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698