| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ev_whitelist_component_installer.h" | 5 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 VLOG(1) << "Failed reading from " << stored_whitelist_path.value(); | 72 VLOG(1) << "Failed reading from " << stored_whitelist_path.value(); |
| 73 return; | 73 return; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // The version number is unknown as the list is loaded from disk, not | 76 // The version number is unknown as the list is loaded from disk, not |
| 77 // the component. | 77 // the component. |
| 78 // In practice very quickly the component updater will call ComponentReady | 78 // In practice very quickly the component updater will call ComponentReady |
| 79 // which will have a valid version. | 79 // which will have a valid version. |
| 80 scoped_refptr<net::ct::EVCertsWhitelist> new_whitelist( | 80 scoped_refptr<net::ct::EVCertsWhitelist> new_whitelist( |
| 81 new packed_ct_ev_whitelist::PackedEVCertsWhitelist(compressed_list, | 81 new packed_ct_ev_whitelist::PackedEVCertsWhitelist(compressed_list, |
| 82 base::Version())); | 82 Version())); |
| 83 if (!new_whitelist->IsValid()) { | 83 if (!new_whitelist->IsValid()) { |
| 84 VLOG(1) << "Failed uncompressing EV certs whitelist."; | 84 VLOG(1) << "Failed uncompressing EV certs whitelist."; |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 | 87 |
| 88 VLOG(1) << "EV whitelist: Sucessfully loaded initial data."; | 88 VLOG(1) << "EV whitelist: Sucessfully loaded initial data."; |
| 89 packed_ct_ev_whitelist::SetEVCertsWhitelist(new_whitelist); | 89 packed_ct_ev_whitelist::SetEVCertsWhitelist(new_whitelist); |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace | 92 } // namespace |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 installer->Register(cus, base::Closure()); | 189 installer->Register(cus, base::Closure()); |
| 190 | 190 |
| 191 if (!content::BrowserThread::PostBlockingPoolTask( | 191 if (!content::BrowserThread::PostBlockingPoolTask( |
| 192 FROM_HERE, | 192 FROM_HERE, |
| 193 base::Bind(&DoInitialLoadFromDisk, GetEVWhitelistFilePath(path)))) { | 193 base::Bind(&DoInitialLoadFromDisk, GetEVWhitelistFilePath(path)))) { |
| 194 NOTREACHED(); | 194 NOTREACHED(); |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace component_updater | 198 } // namespace component_updater |
| OLD | NEW |