refactor: migrates util::Promise to gin (#20871)
* refactor: use gin in Promise * refactor: separate Promise impl that returns nothing * refactor: use Promise<void> for promise that returns nothing * fix: methods should be able to run on both browser and renderer process * fix: should not pass base::StringPiece across threads * refactor: no more need to use different ResolvePromise for empty Promise * refactor: move Promise to gin_helper
This commit is contained in:
parent
bff113760a
commit
eaf2c61bef
48 changed files with 483 additions and 479 deletions
|
@ -14,8 +14,8 @@
|
|||
#include "base/values.h"
|
||||
#include "gin/handle.h"
|
||||
#include "services/network/public/mojom/net_log.mojom.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
#include "shell/common/promise_util.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -53,7 +53,7 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
|
||||
network::mojom::NetLogExporterPtr net_log_exporter_;
|
||||
|
||||
base::Optional<util::Promise<void*>> pending_start_promise_;
|
||||
base::Optional<gin_helper::Promise<void>> pending_start_promise_;
|
||||
|
||||
scoped_refptr<base::TaskRunner> file_task_runner_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue