| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/sw_reporter_installer_win.h" | 5 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> |
| 10 #include <string> | 11 #include <string> |
| 11 #include <utility> | 12 #include <utility> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/base_paths.h" | 15 #include "base/base_paths.h" |
| 15 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 16 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
| 17 #include "base/logging.h" | 18 #include "base/logging.h" |
| 18 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
| 19 #include "base/metrics/sparse_histogram.h" | 20 #include "base/metrics/sparse_histogram.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return base::FilePath(FILE_PATH_LITERAL("SwReporter")); | 137 return base::FilePath(FILE_PATH_LITERAL("SwReporter")); |
| 137 } | 138 } |
| 138 | 139 |
| 139 void GetHash(std::vector<uint8_t>* hash) const override { GetPkHash(hash); } | 140 void GetHash(std::vector<uint8_t>* hash) const override { GetPkHash(hash); } |
| 140 | 141 |
| 141 std::string GetName() const override { return "Software Reporter Tool"; } | 142 std::string GetName() const override { return "Software Reporter Tool"; } |
| 142 | 143 |
| 143 update_client::InstallerAttributes GetInstallerAttributes() const override { | 144 update_client::InstallerAttributes GetInstallerAttributes() const override { |
| 144 return update_client::InstallerAttributes(); | 145 return update_client::InstallerAttributes(); |
| 145 } | 146 } |
| 147 std::vector<std::string> GetMimeTypes() const override { |
| 148 return std::vector<std::string>(); |
| 149 } |
| 146 | 150 |
| 147 static std::string ID() { | 151 static std::string ID() { |
| 148 update_client::CrxComponent component; | 152 update_client::CrxComponent component; |
| 149 component.version = Version("0.0.0.0"); | 153 component.version = Version("0.0.0.0"); |
| 150 GetPkHash(&component.pk_hash); | 154 GetPkHash(&component.pk_hash); |
| 151 return update_client::GetCrxComponentID(component); | 155 return update_client::GetCrxComponentID(component); |
| 152 } | 156 } |
| 153 | 157 |
| 154 private: | 158 private: |
| 155 static void GetPkHash(std::vector<uint8_t>* hash) { | 159 static void GetPkHash(std::vector<uint8_t>* hash) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 256 } |
| 253 | 257 |
| 254 void RegisterProfilePrefsForSwReporter( | 258 void RegisterProfilePrefsForSwReporter( |
| 255 user_prefs::PrefRegistrySyncable* registry) { | 259 user_prefs::PrefRegistrySyncable* registry) { |
| 256 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); | 260 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); |
| 257 | 261 |
| 258 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); | 262 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); |
| 259 } | 263 } |
| 260 | 264 |
| 261 } // namespace component_updater | 265 } // namespace component_updater |
| OLD | NEW |