Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove setExtraParameter for 2.0 #11972

Merged
merged 2 commits into from
Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions atom/common/api/atom_api_crash_reporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ struct Converter<CrashReporter::UploadReportResult> {

namespace {

// TODO(2.0) Remove
void SetExtraParameter(const std::string& key, mate::Arguments* args) {
std::string value;
if (args->GetNext(&value))
CrashReporter::GetInstance()->AddExtraParameter(key, value);
else
CrashReporter::GetInstance()->RemoveExtraParameter(key);
}

void AddExtraParameter(const std::string& key, const std::string& value) {
CrashReporter::GetInstance()->AddExtraParameter(key, value);
}
Expand All @@ -57,7 +48,6 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
mate::Dictionary dict(context->GetIsolate(), exports);
auto reporter = base::Unretained(CrashReporter::GetInstance());
dict.SetMethod("start", base::Bind(&CrashReporter::Start, reporter));
dict.SetMethod("setExtraParameter", &SetExtraParameter);
dict.SetMethod("addExtraParameter", &AddExtraParameter);
dict.SetMethod("removeExtraParameter", &RemoveExtraParameter);
dict.SetMethod("getParameters", &GetParameters);
Expand Down
2 changes: 1 addition & 1 deletion docs/api/crash-reporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This will start the process that will monitor and send the crash reports. Replac
and `crashesDirectory` with appropriate values.

**Note:** If you need send additional/updated `extra` parameters after your
first call `start` you can call `setExtraParameter` on macOS or call `start`
first call `start` you can call `addExtraParameter` on macOS or call `start`
again with the new/updated `extra` parameters on Linux and Windows.

```js
Expand Down
11 changes: 1 addition & 10 deletions lib/common/api/crash-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {spawn} = require('child_process')
const os = require('os')
const path = require('path')
const electron = require('electron')
const {app, deprecate} = process.type === 'browser' ? electron : electron.remote
const {app} = process.type === 'browser' ? electron : electron.remote
const binding = process.atomBinding('crash_reporter')

class CrashReporter {
Expand Down Expand Up @@ -104,15 +104,6 @@ class CrashReporter {
}
}

// TODO(2.0) Remove
setExtraParameter (key, value) {
if (!process.noDeprecations) {
deprecate.warn('crashReporter.setExtraParameter',
'crashReporter.addExtraParameter or crashReporter.removeExtraParameter')
}
binding.setExtraParameter(key, value)
}

addExtraParameter (key, value) {
binding.addExtraParameter(key, value)
}
Expand Down