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

Side by Side Diff: chrome/browser/component_updater/pnacl_component_installer.h

Issue 2483513002: Revert of Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 36
37 // Component installer responsible for Portable Native Client files. 37 // Component installer responsible for Portable Native Client files.
38 // Files can be installed to a shared location, or be installed to 38 // Files can be installed to a shared location, or be installed to
39 // a per-user location. 39 // a per-user location.
40 class PnaclComponentInstaller : public update_client::CrxInstaller { 40 class PnaclComponentInstaller : public update_client::CrxInstaller {
41 public: 41 public:
42 PnaclComponentInstaller(); 42 PnaclComponentInstaller();
43 43
44 // ComponentInstaller implementation: 44 // ComponentInstaller implementation:
45 void OnUpdateError(int error) override; 45 void OnUpdateError(int error) override;
46 update_client::CrxInstaller::Result Install( 46 bool Install(const base::DictionaryValue& manifest,
47 const base::DictionaryValue& manifest, 47 const base::FilePath& unpack_path) override;
48 const base::FilePath& unpack_path) override;
49 bool GetInstalledFile(const std::string& file, 48 bool GetInstalledFile(const std::string& file,
50 base::FilePath* installed_file) override; 49 base::FilePath* installed_file) override;
51 bool Uninstall() override; 50 bool Uninstall() override;
52 51
53 // Register a PNaCl component for the first time. 52 // Register a PNaCl component for the first time.
54 void RegisterPnaclComponent(ComponentUpdateService* cus); 53 void RegisterPnaclComponent(ComponentUpdateService* cus);
55 54
56 update_client::CrxComponent GetCrxComponent(); 55 update_client::CrxComponent GetCrxComponent();
57 56
58 // Determine the base directory for storing each version of PNaCl. 57 // Determine the base directory for storing each version of PNaCl.
59 base::FilePath GetPnaclBaseDirectory(); 58 base::FilePath GetPnaclBaseDirectory();
60 59
61 base::Version current_version() const { return current_version_; } 60 base::Version current_version() const { return current_version_; }
62 61
63 void set_current_version(const base::Version& current_version) { 62 void set_current_version(const base::Version& current_version) {
64 current_version_ = current_version; 63 current_version_ = current_version;
65 } 64 }
66 65
67 std::string current_fingerprint() const { return current_fingerprint_; } 66 std::string current_fingerprint() const { return current_fingerprint_; }
68 67
69 void set_current_fingerprint(const std::string& current_fingerprint) { 68 void set_current_fingerprint(const std::string& current_fingerprint) {
70 current_fingerprint_ = current_fingerprint; 69 current_fingerprint_ = current_fingerprint;
71 } 70 }
72 71
73 ComponentUpdateService* cus() const { return cus_; } 72 ComponentUpdateService* cus() const { return cus_; }
74 73
75 private: 74 private:
76 ~PnaclComponentInstaller() override; 75 ~PnaclComponentInstaller() override;
77 76
78 bool DoInstall(const base::DictionaryValue& manifest,
79 const base::FilePath& unpack_path);
80
81 base::Version current_version_; 77 base::Version current_version_;
82 std::string current_fingerprint_; 78 std::string current_fingerprint_;
83 ComponentUpdateService* cus_; 79 ComponentUpdateService* cus_;
84 80
85 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); 81 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller);
86 }; 82 };
87 83
88 } // namespace component_updater 84 } // namespace component_updater
89 85
90 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_ 86 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698