| 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 "ios/chrome/browser/net/crl_set_fetcher.h" | 5 #include "ios/chrome/browser/net/crl_set_fetcher.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 void CRLSetFetcher::RegisterComponent(uint32_t sequence_of_loaded_crl) { | 130 void CRLSetFetcher::RegisterComponent(uint32_t sequence_of_loaded_crl) { |
| 131 DCHECK_CURRENTLY_ON(web::WebThread::UI); | 131 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
| 132 | 132 |
| 133 update_client::CrxComponent component; | 133 update_client::CrxComponent component; |
| 134 component.pk_hash.assign(kPublicKeySHA256, | 134 component.pk_hash.assign(kPublicKeySHA256, |
| 135 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); | 135 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); |
| 136 component.installer = this; | 136 component.installer = this; |
| 137 component.name = "CRLSet"; | 137 component.name = "CRLSet"; |
| 138 component.version = Version(base::UintToString(sequence_of_loaded_crl)); | 138 component.version = base::Version(base::UintToString(sequence_of_loaded_crl)); |
| 139 component.allows_background_download = false; | 139 component.allows_background_download = false; |
| 140 component.requires_network_encryption = false; | 140 component.requires_network_encryption = false; |
| 141 if (!component.version.IsValid()) { | 141 if (!component.version.IsValid()) { |
| 142 NOTREACHED(); | 142 NOTREACHED(); |
| 143 component.version = Version("0"); | 143 component.version = base::Version("0"); |
| 144 } | 144 } |
| 145 | 145 |
| 146 if (!cus_->RegisterComponent(component)) | 146 if (!cus_->RegisterComponent(component)) |
| 147 NOTREACHED() << "RegisterComponent returned error"; | 147 NOTREACHED() << "RegisterComponent returned error"; |
| 148 } | 148 } |
| 149 | 149 |
| 150 void CRLSetFetcher::DoDeleteFromDisk() { | 150 void CRLSetFetcher::DoDeleteFromDisk() { |
| 151 DCHECK_CURRENTLY_ON(web::WebThread::FILE); | 151 DCHECK_CURRENTLY_ON(web::WebThread::FILE); |
| 152 | 152 |
| 153 DeleteFile(GetCRLSetFilePath(), false /* not recursive */); | 153 DeleteFile(GetCRLSetFilePath(), false /* not recursive */); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 bool CRLSetFetcher::GetInstalledFile(const std::string& file, | 228 bool CRLSetFetcher::GetInstalledFile(const std::string& file, |
| 229 base::FilePath* installed_file) { | 229 base::FilePath* installed_file) { |
| 230 return false; | 230 return false; |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool CRLSetFetcher::Uninstall() { | 233 bool CRLSetFetcher::Uninstall() { |
| 234 return false; | 234 return false; |
| 235 } | 235 } |
| 236 | 236 |
| 237 CRLSetFetcher::~CRLSetFetcher() {} | 237 CRLSetFetcher::~CRLSetFetcher() {} |
| OLD | NEW |