| OLD | NEW |
| 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 #include "chrome/browser/component_updater/caps_installer_win.h" | 5 #include "chrome/browser/component_updater/caps_installer_win.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 CAPSInstallerTraits() {} | 68 CAPSInstallerTraits() {} |
| 69 ~CAPSInstallerTraits() override {} | 69 ~CAPSInstallerTraits() override {} |
| 70 | 70 |
| 71 bool VerifyInstallation(const base::DictionaryValue& manifest, | 71 bool VerifyInstallation(const base::DictionaryValue& manifest, |
| 72 const base::FilePath& dir) const override { | 72 const base::FilePath& dir) const override { |
| 73 bool has_binary = base::PathExists(dir.Append(kCapsBinary)); | 73 bool has_binary = base::PathExists(dir.Append(kCapsBinary)); |
| 74 ReportUmaStep(has_binary ? CAPS_COMPONENT_READY : CAPS_COMPONENT_MISSING); | 74 ReportUmaStep(has_binary ? CAPS_COMPONENT_READY : CAPS_COMPONENT_MISSING); |
| 75 return has_binary; | 75 return has_binary; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool CanAutoUpdate() const override { return true; } | 78 bool SupportsGroupPolicyEnabledComponentUpdates() const override { |
| 79 return false; |
| 80 } |
| 79 | 81 |
| 80 bool RequiresNetworkEncryption() const override { return false; } | 82 bool RequiresNetworkEncryption() const override { return false; } |
| 81 | 83 |
| 82 bool OnCustomInstall(const base::DictionaryValue& manifest, | 84 bool OnCustomInstall(const base::DictionaryValue& manifest, |
| 83 const base::FilePath& install_dir) override { | 85 const base::FilePath& install_dir) override { |
| 84 return true; | 86 return true; |
| 85 } | 87 } |
| 86 | 88 |
| 87 void ComponentReady( | 89 void ComponentReady( |
| 88 const base::Version& version, | 90 const base::Version& version, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 123 |
| 122 void RegisterCAPSComponent(ComponentUpdateService* cus) { | 124 void RegisterCAPSComponent(ComponentUpdateService* cus) { |
| 123 // The component updater takes ownership of |installer|. | 125 // The component updater takes ownership of |installer|. |
| 124 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits()); | 126 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits()); |
| 125 DefaultComponentInstaller* installer = | 127 DefaultComponentInstaller* installer = |
| 126 new DefaultComponentInstaller(std::move(traits)); | 128 new DefaultComponentInstaller(std::move(traits)); |
| 127 installer->Register(cus, base::Closure()); | 129 installer->Register(cus, base::Closure()); |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace component_updater | 132 } // namespace component_updater |
| OLD | NEW |