refactor: make util::Promise type safe when chaining in native (#19809)
* refactor: make util::Promise type safe when chaining in native * fixup! refactor: make util::Promise type safe when chaining in native * chore: remove spare brackets
This commit is contained in:
parent
f7e3e1f97a
commit
6a3922d330
39 changed files with 275 additions and 343 deletions
|
@ -25,8 +25,8 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
|||
GPUInfoManager();
|
||||
~GPUInfoManager() override;
|
||||
bool NeedsCompleteGpuInfoCollection() const;
|
||||
void FetchCompleteInfo(util::Promise promise);
|
||||
void FetchBasicInfo(util::Promise promise);
|
||||
void FetchCompleteInfo(util::Promise<base::DictionaryValue> promise);
|
||||
void FetchBasicInfo(util::Promise<base::DictionaryValue> promise);
|
||||
void OnGpuInfoUpdate() override;
|
||||
|
||||
private:
|
||||
|
@ -34,12 +34,12 @@ class GPUInfoManager : public content::GpuDataManagerObserver {
|
|||
gpu::GPUInfo gpu_info) const;
|
||||
|
||||
// These should be posted to the task queue
|
||||
void CompleteInfoFetcher(util::Promise promise);
|
||||
void CompleteInfoFetcher(util::Promise<base::DictionaryValue> promise);
|
||||
void ProcessCompleteInfo();
|
||||
|
||||
// This set maintains all the promises that should be fulfilled
|
||||
// once we have the complete information data
|
||||
std::vector<util::Promise> complete_info_promise_set_;
|
||||
std::vector<util::Promise<base::DictionaryValue>> complete_info_promise_set_;
|
||||
content::GpuDataManager* gpu_data_manager_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GPUInfoManager);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue