refactor: use Error util when only throwing errors (#19837)
This commit is contained in:
parent
ef6d4a46c2
commit
c89debd19a
3 changed files with 31 additions and 28 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/browser_observer.h"
|
||||
#include "shell/common/error_util.h"
|
||||
#include "shell/common/native_mate_converters/callback.h"
|
||||
#include "shell/common/promise_util.h"
|
||||
|
||||
|
@ -164,12 +165,12 @@ class App : public AtomBrowserClient::Delegate,
|
|||
void ChildProcessLaunched(int process_type, base::ProcessHandle handle);
|
||||
void ChildProcessDisconnected(base::ProcessId pid);
|
||||
|
||||
void SetAppLogsPath(base::Optional<base::FilePath> custom_path,
|
||||
mate::Arguments* args);
|
||||
void SetAppLogsPath(util::ErrorThrower thrower,
|
||||
base::Optional<base::FilePath> custom_path);
|
||||
|
||||
// Get/Set the pre-defined path in PathService.
|
||||
base::FilePath GetPath(mate::Arguments* args, const std::string& name);
|
||||
void SetPath(mate::Arguments* args,
|
||||
base::FilePath GetPath(util::ErrorThrower thrower, const std::string& name);
|
||||
void SetPath(util::ErrorThrower thrower,
|
||||
const std::string& name,
|
||||
const base::FilePath& path);
|
||||
|
||||
|
@ -182,10 +183,10 @@ class App : public AtomBrowserClient::Delegate,
|
|||
bool RequestSingleInstanceLock();
|
||||
void ReleaseSingleInstanceLock();
|
||||
bool Relaunch(mate::Arguments* args);
|
||||
void DisableHardwareAcceleration(mate::Arguments* args);
|
||||
void DisableDomainBlockingFor3DAPIs(mate::Arguments* args);
|
||||
void DisableHardwareAcceleration(util::ErrorThrower thrower);
|
||||
void DisableDomainBlockingFor3DAPIs(util::ErrorThrower thrower);
|
||||
bool IsAccessibilitySupportEnabled();
|
||||
void SetAccessibilitySupportEnabled(bool enabled, mate::Arguments* args);
|
||||
void SetAccessibilitySupportEnabled(util::ErrorThrower thrower, bool enabled);
|
||||
Browser::LoginItemSettings GetLoginItemSettings(mate::Arguments* args);
|
||||
#if defined(USE_NSS_CERTS)
|
||||
void ImportCertificate(const base::DictionaryValue& options,
|
||||
|
@ -198,7 +199,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
v8::Local<v8::Value> GetGPUFeatureStatus(v8::Isolate* isolate);
|
||||
v8::Local<v8::Promise> GetGPUInfo(v8::Isolate* isolate,
|
||||
const std::string& info_type);
|
||||
void EnableSandbox(mate::Arguments* args);
|
||||
void EnableSandbox(util::ErrorThrower thrower);
|
||||
void SetUserAgentFallback(const std::string& user_agent);
|
||||
std::string GetUserAgentFallback();
|
||||
void SetBrowserClientCanUseCustomSiteInstance(bool should_disable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue