Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: ios/chrome/browser/net/crl_set_fetcher.h

Issue 2479633003: Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ 5 #ifndef IOS_CHROME_BROWSER_NET_CRL_SET_FETCHER_H_
6 #define IOS_CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ 6 #define IOS_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
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 bool Install(const base::DictionaryValue& manifest, 43 Result Install(const base::DictionaryValue& manifest,
44 const base::FilePath& unpack_path) override; 44 const base::FilePath& unpack_path) override;
45 bool GetInstalledFile(const std::string& file, 45 bool GetInstalledFile(const std::string& file,
46 base::FilePath* installed_file) override; 46 base::FilePath* installed_file) override;
47 bool Uninstall() override; 47 bool Uninstall() override;
48 48
49 private: 49 private:
50 friend class base::RefCountedThreadSafe<CRLSetFetcher>; 50 friend class base::RefCountedThreadSafe<CRLSetFetcher>;
51 51
52 ~CRLSetFetcher() override; 52 ~CRLSetFetcher() override;
53 53
54 // 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
72 // 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.
73 void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set); 73 void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set);
74 74
75 // RegisterComponent registers this object as a component updater. 75 // RegisterComponent registers this object as a component updater.
76 void RegisterComponent(uint32_t sequence_of_loaded_crl); 76 void RegisterComponent(uint32_t sequence_of_loaded_crl);
77 77
78 // 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
79 // the disk. 79 // the disk.
80 void DoDeleteFromDisk(); 80 void DoDeleteFromDisk();
81 81
82 bool DoInstall(const base::DictionaryValue& manifest,
83 const base::FilePath& unpack_path);
84
82 component_updater::ComponentUpdateService* cus_; 85 component_updater::ComponentUpdateService* cus_;
83 86
84 // Path where the CRL file is stored. 87 // Path where the CRL file is stored.
85 base::FilePath crl_path_; 88 base::FilePath crl_path_;
86 89
87 // We keep a pointer to the current CRLSet for use on the FILE thread when 90 // We keep a pointer to the current CRLSet for use on the FILE thread when
88 // applying delta updates. 91 // applying delta updates.
89 scoped_refptr<net::CRLSet> crl_set_; 92 scoped_refptr<net::CRLSet> crl_set_;
90 93
91 DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher); 94 DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher);
92 }; 95 };
93 96
94 #endif // IOS_CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ 97 #endif // IOS_CHROME_BROWSER_NET_CRL_SET_FETCHER_H_
OLDNEW
« no previous file with comments | « extensions/browser/updater/update_install_shim.cc ('k') | ios/chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698