chore: use HTTP method constants (#29650)

This commit is contained in:
David Sanders 2021-06-13 19:04:36 -07:00 committed by GitHub
parent e8c9a814d6
commit f6d673c32a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "content/public/renderer/render_frame.h"
#include "electron/buildflags/buildflags.h"
#include "net/http/http_request_headers.h"
#include "shell/common/api/electron_bindings.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/event_emitter_caller.h"
@ -169,7 +170,7 @@ bool ElectronRendererClient::ShouldFork(blink::WebLocalFrame* frame,
// FIXME We only support GET here because http method will be ignored when
// the OpenURLFromTab is triggered, which means form posting would not work,
// we should solve this by patching Chromium in future.
return http_method == "GET";
return http_method == net::HttpRequestHeaders::kGetMethod;
}
void ElectronRendererClient::WorkerScriptReadyForEvaluationOnWorkerThread(