Skip to content

Commit

Permalink
refactor: remove unused C string ToV8() gin converter (#44500)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckerr authored Nov 1, 2024
1 parent b985d8e commit 9137d96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion shell/browser/api/electron_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
}

void WebContents::ContentsZoomChange(bool zoom_in) {
Emit("zoom-changed", zoom_in ? "in" : "out");
Emit("zoom-changed", std::string_view{zoom_in ? "in" : "out"});
}

Profile* WebContents::GetProfile() {
Expand Down
8 changes: 0 additions & 8 deletions shell/common/gin_converters/std_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ struct Converter<std::nullptr_t> {
}
};

template <>
struct Converter<const char*> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, const char* val) {
return v8::String::NewFromUtf8(isolate, val, v8::NewStringType::kNormal)
.ToLocalChecked();
}
};

template <>
struct Converter<char[]> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, const char* val) {
Expand Down

0 comments on commit 9137d96

Please sign in to comment.