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

Side by Side Diff: 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 (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
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 update_client::CrxInstaller::Result Install(
44 const base::FilePath& unpack_path) override; 44 const base::DictionaryValue& manifest,
45 const base::FilePath& unpack_path) override;
45 bool GetInstalledFile(const std::string& file, 46 bool GetInstalledFile(const std::string& file,
46 base::FilePath* installed_file) override; 47 base::FilePath* installed_file) override;
47 bool Uninstall() override; 48 bool Uninstall() override;
48 49
49 private: 50 private:
50 friend class base::RefCountedThreadSafe<CRLSetFetcher>; 51 friend class base::RefCountedThreadSafe<CRLSetFetcher>;
51 52
52 ~CRLSetFetcher() override; 53 ~CRLSetFetcher() override;
53 54
54 // GetCRLSetbase::FilePath gets the path of the CRL set file in the user data 55 // 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. 73 // as the global CRL set if it's newer than the existing one.
73 void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set); 74 void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set);
74 75
75 // RegisterComponent registers this object as a component updater. 76 // RegisterComponent registers this object as a component updater.
76 void RegisterComponent(uint32_t sequence_of_loaded_crl); 77 void RegisterComponent(uint32_t sequence_of_loaded_crl);
77 78
78 // DoDeleteFromDisk runs on the FILE thread and removes the CRLSet file from 79 // DoDeleteFromDisk runs on the FILE thread and removes the CRLSet file from
79 // the disk. 80 // the disk.
80 void DoDeleteFromDisk(); 81 void DoDeleteFromDisk();
81 82
83 bool DoInstall(const base::DictionaryValue& manifest,
84 const base::FilePath& unpack_path);
85
82 component_updater::ComponentUpdateService* cus_; 86 component_updater::ComponentUpdateService* cus_;
83 87
84 // Path where the CRL file is stored. 88 // Path where the CRL file is stored.
85 base::FilePath crl_path_; 89 base::FilePath crl_path_;
86 90
87 // We keep a pointer to the current CRLSet for use on the FILE thread when 91 // We keep a pointer to the current CRLSet for use on the FILE thread when
88 // applying delta updates. 92 // applying delta updates.
89 scoped_refptr<net::CRLSet> crl_set_; 93 scoped_refptr<net::CRLSet> crl_set_;
90 94
91 DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher); 95 DISALLOW_COPY_AND_ASSIGN(CRLSetFetcher);
92 }; 96 };
93 97
94 #endif // CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ 98 #endif // CHROME_BROWSER_NET_CRL_SET_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/widevine_cdm_component_installer.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698