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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_constants.h" | 15 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
17 #include "components/component_updater/component_updater_service.h" | 17 #include "components/component_updater/component_updater_service.h" |
| 18 #include "components/update_client/update_client.h" |
18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
19 #include "net/cert/crl_set.h" | 20 #include "net/cert/crl_set.h" |
20 #include "net/cert/crl_set_storage.h" | 21 #include "net/cert/crl_set_storage.h" |
21 #include "net/ssl/ssl_config_service.h" | 22 #include "net/ssl/ssl_config_service.h" |
22 | 23 |
23 using component_updater::ComponentUpdateService; | 24 using component_updater::ComponentUpdateService; |
24 using content::BrowserThread; | 25 using content::BrowserThread; |
25 | 26 |
26 CRLSetFetcher::CRLSetFetcher() : cus_(NULL) {} | 27 CRLSetFetcher::CRLSetFetcher() : cus_(NULL) {} |
27 | 28 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 static const uint8 kPublicKeySHA256[32] = { | 132 static const uint8 kPublicKeySHA256[32] = { |
132 0x75, 0xda, 0xf8, 0xcb, 0x77, 0x68, 0x40, 0x33, | 133 0x75, 0xda, 0xf8, 0xcb, 0x77, 0x68, 0x40, 0x33, |
133 0x65, 0x4c, 0x97, 0xe5, 0xc5, 0x1b, 0xcd, 0x81, | 134 0x65, 0x4c, 0x97, 0xe5, 0xc5, 0x1b, 0xcd, 0x81, |
134 0x7b, 0x1e, 0xeb, 0x11, 0x2c, 0xe1, 0xa4, 0x33, | 135 0x7b, 0x1e, 0xeb, 0x11, 0x2c, 0xe1, 0xa4, 0x33, |
135 0x8c, 0xf5, 0x72, 0x5e, 0xed, 0xb8, 0x43, 0x97, | 136 0x8c, 0xf5, 0x72, 0x5e, 0xed, 0xb8, 0x43, 0x97, |
136 }; | 137 }; |
137 | 138 |
138 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { | 139 void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { |
139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
140 | 141 |
141 component_updater::CrxComponent component; | 142 update_client::CrxComponent component; |
142 component.pk_hash.assign(kPublicKeySHA256, | 143 component.pk_hash.assign(kPublicKeySHA256, |
143 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); | 144 kPublicKeySHA256 + sizeof(kPublicKeySHA256)); |
144 component.installer = this; | 145 component.installer = this; |
145 component.name = "CRLSet"; | 146 component.name = "CRLSet"; |
146 component.version = Version(base::UintToString(sequence_of_loaded_crl)); | 147 component.version = Version(base::UintToString(sequence_of_loaded_crl)); |
147 component.allow_background_download = false; | 148 component.allow_background_download = false; |
148 if (!component.version.IsValid()) { | 149 if (!component.version.IsValid()) { |
149 NOTREACHED(); | 150 NOTREACHED(); |
150 component.version = Version("0"); | 151 component.version = Version("0"); |
151 } | 152 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 235 |
235 return true; | 236 return true; |
236 } | 237 } |
237 | 238 |
238 bool CRLSetFetcher::GetInstalledFile( | 239 bool CRLSetFetcher::GetInstalledFile( |
239 const std::string& file, base::FilePath* installed_file) { | 240 const std::string& file, base::FilePath* installed_file) { |
240 return false; | 241 return false; |
241 } | 242 } |
242 | 243 |
243 CRLSetFetcher::~CRLSetFetcher() {} | 244 CRLSetFetcher::~CRLSetFetcher() {} |
OLD | NEW |