| 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 <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // These two sets of values are used to send UMA information and are replicated | 44 // These two sets of values are used to send UMA information and are replicated |
| 45 // in the histograms.xml file, so the order MUST NOT CHANGE. | 45 // in the histograms.xml file, so the order MUST NOT CHANGE. |
| 46 enum SRTCompleted { | 46 enum SRTCompleted { |
| 47 SRT_COMPLETED_NOT_YET = 0, | 47 SRT_COMPLETED_NOT_YET = 0, |
| 48 SRT_COMPLETED_YES = 1, | 48 SRT_COMPLETED_YES = 1, |
| 49 SRT_COMPLETED_LATER = 2, | 49 SRT_COMPLETED_LATER = 2, |
| 50 SRT_COMPLETED_MAX, | 50 SRT_COMPLETED_MAX, |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // The maximum number of times to retry a download on startup. | |
| 54 const int kMaxRetry = 20; | |
| 55 | |
| 56 // CRX hash. The extension id is: gkmgaooipdjhmangpemjhigmamcehddo. The hash was | 53 // CRX hash. The extension id is: gkmgaooipdjhmangpemjhigmamcehddo. The hash was |
| 57 // generated in Python with something like this: | 54 // generated in Python with something like this: |
| 58 // hashlib.sha256().update(open("<file>.crx").read()[16:16+294]).digest(). | 55 // hashlib.sha256().update(open("<file>.crx").read()[16:16+294]).digest(). |
| 59 const uint8_t kSha256Hash[] = {0x6a, 0xc6, 0x0e, 0xe8, 0xf3, 0x97, 0xc0, 0xd6, | 56 const uint8_t kSha256Hash[] = {0x6a, 0xc6, 0x0e, 0xe8, 0xf3, 0x97, 0xc0, 0xd6, |
| 60 0xf4, 0xc9, 0x78, 0x6c, 0x0c, 0x24, 0x73, 0x3e, | 57 0xf4, 0xc9, 0x78, 0x6c, 0x0c, 0x24, 0x73, 0x3e, |
| 61 0x05, 0xa5, 0x62, 0x4b, 0x2e, 0xc7, 0xb7, 0x1c, | 58 0x05, 0xa5, 0x62, 0x4b, 0x2e, 0xc7, 0xb7, 0x1c, |
| 62 0x5f, 0xea, 0xf0, 0x88, 0xf6, 0x97, 0x9b, 0xc7}; | 59 0x5f, 0xea, 0xf0, 0x88, 0xf6, 0x97, 0x9b, 0xc7}; |
| 63 | 60 |
| 64 const base::FilePath::CharType kSwReporterExeName[] = | 61 const base::FilePath::CharType kSwReporterExeName[] = |
| 65 FILE_PATH_LITERAL("software_reporter_tool.exe"); | 62 FILE_PATH_LITERAL("software_reporter_tool.exe"); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 322 } |
| 326 | 323 |
| 327 void RegisterProfilePrefsForSwReporter( | 324 void RegisterProfilePrefsForSwReporter( |
| 328 user_prefs::PrefRegistrySyncable* registry) { | 325 user_prefs::PrefRegistrySyncable* registry) { |
| 329 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); | 326 registry->RegisterStringPref(prefs::kSwReporterPromptVersion, ""); |
| 330 | 327 |
| 331 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); | 328 registry->RegisterStringPref(prefs::kSwReporterPromptSeed, ""); |
| 332 } | 329 } |
| 333 | 330 |
| 334 } // namespace component_updater | 331 } // namespace component_updater |
| OLD | NEW |