OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/crl_set_fetcher.h" | 5 #include "chrome/browser/net/crl_set_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 }; | 137 }; |
138 | 138 |
139 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { | 139 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { |
140 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 140 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
141 | 141 |
142 update_client::CrxComponent component; | 142 update_client::CrxComponent component; |
143 component.pk_hash.assign(kPublicKeySHA256, | 143 component.pk_hash.assign(kPublicKeySHA256, |
144 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); | 144 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); |
145 component.installer = this; | 145 component.installer = this; |
146 component.name = "CRLSet"; | 146 component.name = "CRLSet"; |
147 component.version = base::Version(base::UintToString(sequence_of_loaded_crl)); | 147 component.version = Version(base::UintToString(sequence_of_loaded_crl)); |
148 component.allow_background_download = false; | 148 component.allow_background_download = false; |
149 if (!component.version.IsValid()) { | 149 if (!component.version.IsValid()) { |
150 NOTREACHED(); | 150 NOTREACHED(); |
151 component.version = base::Version("0"); | 151 component.version = Version("0"); |
152 } | 152 } |
153 | 153 |
154 if (!cus_->RegisterComponent(component)) | 154 if (!cus_->RegisterComponent(component)) |
155 NOTREACHED() << "RegisterComponent returned error"; | 155 NOTREACHED() << "RegisterComponent returned error"; |
156 } | 156 } |
157 | 157 |
158 void CRLSetFetcher::DoDeleteFromDisk() { | 158 void CRLSetFetcher::DoDeleteFromDisk() { |
159 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 159 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
160 | 160 |
161 DeleteFile(GetCRLSetFilePath(), false /* not recursive */); | 161 DeleteFile(GetCRLSetFilePath(), false /* not recursive */); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 bool CRLSetFetcher::GetInstalledFile( | 237 bool CRLSetFetcher::GetInstalledFile( |
238 const std::string& file, base::FilePath* installed_file) { | 238 const std::string& file, base::FilePath* installed_file) { |
239 return false; | 239 return false; |
240 } | 240 } |
241 | 241 |
242 bool CRLSetFetcher::Uninstall() { | 242 bool CRLSetFetcher::Uninstall() { |
243 return false; | 243 return false; |
244 } | 244 } |
245 | 245 |
246 CRLSetFetcher::~CRLSetFetcher() {} | 246 CRLSetFetcher::~CRLSetFetcher() {} |
OLD | NEW |