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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 }; | 119 }; |
120 | 120 |
121 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { | 121 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { |
122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
123 | 123 |
124 CrxComponent component; | 124 CrxComponent component; |
125 component.pk_hash.assign(kPublicKeySHA256, | 125 component.pk_hash.assign(kPublicKeySHA256, |
126 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); | 126 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); |
127 component.installer = this; | 127 component.installer = this; |
128 component.name = "CRLSet"; | 128 component.name = "CRLSet"; |
129 component.version = Version(base::UintToString(sequence_of_loaded_crl)); | 129 component.version = base::Version(base::UintToString(sequence_of_loaded_crl)); |
130 if (!component.version.IsValid()) { | 130 if (!component.version.IsValid()) { |
131 NOTREACHED(); | 131 NOTREACHED(); |
132 component.version = Version("0"); | 132 component.version = base::Version("0"); |
133 } | 133 } |
134 | 134 |
135 if (cus_->RegisterComponent(component) != | 135 if (cus_->RegisterComponent(component) != |
136 ComponentUpdateService::kOk) { | 136 ComponentUpdateService::kOk) { |
137 NOTREACHED() << "RegisterComponent returned error"; | 137 NOTREACHED() << "RegisterComponent returned error"; |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 void CRLSetFetcher::OnUpdateError(int error) { | 141 void CRLSetFetcher::OnUpdateError(int error) { |
142 LOG(WARNING) << "CRLSetFetcher got error " << error | 142 LOG(WARNING) << "CRLSetFetcher got error " << error |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 return true; | 204 return true; |
205 } | 205 } |
206 | 206 |
207 bool CRLSetFetcher::GetInstalledFile( | 207 bool CRLSetFetcher::GetInstalledFile( |
208 const std::string& file, base::FilePath* installed_file) { | 208 const std::string& file, base::FilePath* installed_file) { |
209 return false; | 209 return false; |
210 } | 210 } |
211 | 211 |
212 CRLSetFetcher::~CRLSetFetcher() {} | 212 CRLSetFetcher::~CRLSetFetcher() {} |
OLD | NEW |