| 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 #ifndef CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ |   5 #ifndef CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ | 
|   6 #define CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ |   6 #define CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ | 
|   7  |   7  | 
|   8 #include <stdint.h> |   8 #include <stdint.h> | 
|   9  |   9  | 
|  10 #include <string> |  10 #include <string> | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  33   CRLSetFetcher(); |  33   CRLSetFetcher(); | 
|  34  |  34  | 
|  35   void StartInitialLoad(component_updater::ComponentUpdateService* cus, |  35   void StartInitialLoad(component_updater::ComponentUpdateService* cus, | 
|  36                         const base::FilePath& path); |  36                         const base::FilePath& path); | 
|  37  |  37  | 
|  38   // DeleteFromDisk asynchronously delete the CRLSet file. |  38   // DeleteFromDisk asynchronously delete the CRLSet file. | 
|  39   void DeleteFromDisk(const base::FilePath& path); |  39   void DeleteFromDisk(const base::FilePath& path); | 
|  40  |  40  | 
|  41   // ComponentInstaller interface |  41   // ComponentInstaller interface | 
|  42   void OnUpdateError(int error) override; |  42   void OnUpdateError(int error) override; | 
|  43   update_client::CrxInstaller::Result Install( |  43   bool Install(const base::DictionaryValue& manifest, | 
|  44       const base::DictionaryValue& manifest, |  44                const base::FilePath& unpack_path) override; | 
|  45       const base::FilePath& unpack_path) override; |  | 
|  46   bool GetInstalledFile(const std::string& file, |  45   bool GetInstalledFile(const std::string& file, | 
|  47                         base::FilePath* installed_file) override; |  46                         base::FilePath* installed_file) override; | 
|  48   bool Uninstall() override; |  47   bool Uninstall() override; | 
|  49  |  48  | 
|  50  private: |  49  private: | 
|  51   friend class base::RefCountedThreadSafe<CRLSetFetcher>; |  50   friend class base::RefCountedThreadSafe<CRLSetFetcher>; | 
|  52  |  51  | 
|  53   ~CRLSetFetcher() override; |  52   ~CRLSetFetcher() override; | 
|  54  |  53  | 
|  55   // GetCRLSetbase::FilePath gets the path of the CRL set file in the user data |  54   // GetCRLSetbase::FilePath gets the path of the CRL set file in the user data | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
|  73   // as the global CRL set if it's newer than the existing one. |  72   // as the global CRL set if it's newer than the existing one. | 
|  74   void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set); |  73   void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set); | 
|  75  |  74  | 
|  76   // RegisterComponent registers this object as a component updater. |  75   // RegisterComponent registers this object as a component updater. | 
|  77   void RegisterComponent(uint32_t sequence_of_loaded_crl); |  76   void RegisterComponent(uint32_t sequence_of_loaded_crl); | 
|  78  |  77  | 
|  79   // DoDeleteFromDisk runs on the FILE thread and removes the CRLSet file from |  78   // DoDeleteFromDisk runs on the FILE thread and removes the CRLSet file from | 
|  80   // the disk. |  79   // the disk. | 
|  81   void DoDeleteFromDisk(); |  80   void DoDeleteFromDisk(); | 
|  82  |  81  | 
|  83   bool DoInstall(const base::DictionaryValue& manifest, |  | 
|  84                  const base::FilePath& unpack_path); |  | 
|  85  |  | 
|  86   component_updater::ComponentUpdateService* cus_; |  82   component_updater::ComponentUpdateService* cus_; | 
|  87  |  83  | 
|  88   // Path where the CRL file is stored. |  84   // Path where the CRL file is stored. | 
|  89   base::FilePath crl_path_; |  85   base::FilePath crl_path_; | 
|  90  |  86  | 
|  91   // We keep a pointer to the current CRLSet for use on the FILE thread when |  87   // We keep a pointer to the current CRLSet for use on the FILE thread when | 
|  92   // applying delta updates. |  88   // applying delta updates. | 
|  93   scoped_refptr<net::CRLSet> crl_set_; |  89   scoped_refptr<net::CRLSet> crl_set_; | 
|  94  |  90  | 
|  95   DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher); |  91   DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher); | 
|  96 }; |  92 }; | 
|  97  |  93  | 
|  98 #endif  // CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ |  94 #endif  // CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ | 
| OLD | NEW |