refactor: ginify app (#24679)

This commit is contained in:
Jeremy Rose 2020-07-28 16:43:43 -07:00 committed by GitHub
parent 834408a50f
commit 9c37e12e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 91 additions and 82 deletions

View file

@ -22,7 +22,7 @@ void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
// Get base64 encoded NSData, create a bookmark for it and start accessing it.
base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
gin_helper::Arguments* args) {
gin::Arguments* args) {
std::string data;
args->GetNext(&data);
NSString* base64str = base::SysUTF8ToNSString(data);
@ -42,11 +42,13 @@ base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
if (error != nil) {
NSString* err =
[NSString stringWithFormat:@"NSError: %@ %@", error, [error userInfo]];
args->ThrowError(base::SysNSStringToUTF8(err));
gin_helper::ErrorThrower(args->isolate())
.ThrowError(base::SysNSStringToUTF8(err));
}
if (isStale) {
args->ThrowError("bookmarkDataIsStale - try recreating the bookmark");
gin_helper::ErrorThrower(args->isolate())
.ThrowError("bookmarkDataIsStale - try recreating the bookmark");
}
if (error == nil && isStale == false) {