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
|
@ -17,8 +17,8 @@
|
|||
#include "shell/common/gin_converters/net_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/gin_helper/promise.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/promise_util.h"
|
||||
#include "url/url_util.h"
|
||||
|
||||
namespace {
|
||||
|
@ -223,7 +223,7 @@ v8::Local<v8::Promise> Protocol::IsProtocolHandled(const std::string& scheme,
|
|||
"protocol.isProtocolRegistered or protocol.isProtocolIntercepted "
|
||||
"instead.",
|
||||
"ProtocolDeprecateIsProtocolHandled");
|
||||
return util::Promise<bool>::ResolvedPromise(
|
||||
return gin_helper::Promise<bool>::ResolvedPromise(
|
||||
isolate(), IsProtocolRegistered(scheme) ||
|
||||
IsProtocolIntercepted(scheme) ||
|
||||
// The |isProtocolHandled| should return true for builtin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue