| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return; | 56 return; |
| 57 SetCRLSetFilePath(path); | 57 SetCRLSetFilePath(path); |
| 58 if (!BrowserThread::PostTask( | 58 if (!BrowserThread::PostTask( |
| 59 BrowserThread::FILE, FROM_HERE, | 59 BrowserThread::FILE, FROM_HERE, |
| 60 base::Bind(&CRLSetFetcher::DoDeleteFromDisk, this))) { | 60 base::Bind(&CRLSetFetcher::DoDeleteFromDisk, this))) { |
| 61 NOTREACHED(); | 61 NOTREACHED(); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 void CRLSetFetcher::DoInitialLoadFromDisk() { | 65 void CRLSetFetcher::DoInitialLoadFromDisk() { |
| 66 TRACE_EVENT0("CRLSetFetcher", "CRLSetFetcher::DoInitialLoadFromDisk"); |
| 66 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 67 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
| 67 | 68 |
| 68 LoadFromDisk(GetCRLSetFilePath(), &crl_set_); | 69 LoadFromDisk(GetCRLSetFilePath(), &crl_set_); |
| 69 | 70 |
| 70 uint32_t sequence_of_loaded_crl = 0; | 71 uint32_t sequence_of_loaded_crl = 0; |
| 71 if (crl_set_.get()) | 72 if (crl_set_.get()) |
| 72 sequence_of_loaded_crl = crl_set_->sequence(); | 73 sequence_of_loaded_crl = crl_set_->sequence(); |
| 73 | 74 |
| 74 // Get updates, advertising the sequence number of the CRL set that we just | 75 // Get updates, advertising the sequence number of the CRL set that we just |
| 75 // loaded, if any. | 76 // loaded, if any. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 bool CRLSetFetcher::GetInstalledFile( | 237 bool CRLSetFetcher::GetInstalledFile( |
| 237 const std::string& file, base::FilePath* installed_file) { | 238 const std::string& file, base::FilePath* installed_file) { |
| 238 return false; | 239 return false; |
| 239 } | 240 } |
| 240 | 241 |
| 241 bool CRLSetFetcher::Uninstall() { | 242 bool CRLSetFetcher::Uninstall() { |
| 242 return false; | 243 return false; |
| 243 } | 244 } |
| 244 | 245 |
| 245 CRLSetFetcher::~CRLSetFetcher() {} | 246 CRLSetFetcher::~CRLSetFetcher() {} |
| OLD | NEW |