| 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 <string> | 9 #include <string> |
| 9 #include <utility> | 10 #include <utility> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/bind.h" | 13 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 hash->assign(kSha256Hash, | 104 hash->assign(kSha256Hash, |
| 104 kSha256Hash + arraysize(kSha256Hash)); | 105 kSha256Hash + arraysize(kSha256Hash)); |
| 105 } | 106 } |
| 106 | 107 |
| 107 // This string is shown in chrome://components. | 108 // This string is shown in chrome://components. |
| 108 std::string GetName() const override { return "Chrome Crash Service"; } | 109 std::string GetName() const override { return "Chrome Crash Service"; } |
| 109 | 110 |
| 110 update_client::InstallerAttributes GetInstallerAttributes() const override { | 111 update_client::InstallerAttributes GetInstallerAttributes() const override { |
| 111 return update_client::InstallerAttributes(); | 112 return update_client::InstallerAttributes(); |
| 112 } | 113 } |
| 114 |
| 115 std::vector<std::string> GetMimeTypes() const override { |
| 116 return std::vector<std::string>(); |
| 117 } |
| 113 }; | 118 }; |
| 114 | 119 |
| 115 } // namespace | 120 } // namespace |
| 116 | 121 |
| 117 void RegisterCAPSComponent(ComponentUpdateService* cus) { | 122 void RegisterCAPSComponent(ComponentUpdateService* cus) { |
| 118 // The component updater takes ownership of |installer|. | 123 // The component updater takes ownership of |installer|. |
| 119 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits()); | 124 std::unique_ptr<ComponentInstallerTraits> traits(new CAPSInstallerTraits()); |
| 120 DefaultComponentInstaller* installer = | 125 DefaultComponentInstaller* installer = |
| 121 new DefaultComponentInstaller(std::move(traits)); | 126 new DefaultComponentInstaller(std::move(traits)); |
| 122 installer->Register(cus, base::Closure()); | 127 installer->Register(cus, base::Closure()); |
| 123 } | 128 } |
| 124 | 129 |
| 125 } // namespace component_updater | 130 } // namespace component_updater |
| OLD | NEW |