| Index: extensions/browser/api/app_window/app_window_api.cc
|
| diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
|
| index e5dd713972400fee3538a8dbe2bb5fc589249f38..05650e924e8f17ebe468697cd3f1086f71742b17 100644
|
| --- a/extensions/browser/api/app_window/app_window_api.cc
|
| +++ b/extensions/browser/api/app_window/app_window_api.cc
|
| @@ -4,6 +4,9 @@
|
|
|
| #include "extensions/browser/api/app_window/app_window_api.h"
|
|
|
| +#include <memory>
|
| +#include <utility>
|
| +
|
| #include "base/command_line.h"
|
| #include "base/macros.h"
|
| #include "base/strings/string_number_conversions.h"
|
| @@ -191,11 +194,12 @@ bool AppWindowCreateFunction::RunAsync() {
|
| existing_window->Show(AppWindow::SHOW_ACTIVE);
|
| }
|
|
|
| - base::DictionaryValue* result = new base::DictionaryValue;
|
| + std::unique_ptr<base::DictionaryValue> result(
|
| + new base::DictionaryValue);
|
| result->Set("frameId", new base::FundamentalValue(frame_id));
|
| - existing_window->GetSerializedState(result);
|
| + existing_window->GetSerializedState(result.get());
|
| result->SetBoolean("existingWindow", true);
|
| - SetResult(result);
|
| + SetResult(std::move(result));
|
| SendResponse(true);
|
| return true;
|
| }
|
| @@ -354,11 +358,11 @@ bool AppWindowCreateFunction::RunAsync() {
|
| if (create_params.creator_process_id == created_frame->GetProcess()->GetID())
|
| frame_id = created_frame->GetRoutingID();
|
|
|
| - base::DictionaryValue* result = new base::DictionaryValue;
|
| + std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
|
| result->Set("frameId", new base::FundamentalValue(frame_id));
|
| result->Set("id", new base::StringValue(app_window->window_key()));
|
| - app_window->GetSerializedState(result);
|
| - SetResult(result);
|
| + app_window->GetSerializedState(result.get());
|
| + SetResult(std::move(result));
|
|
|
| if (AppWindowRegistry::Get(browser_context())
|
| ->HadDevToolsAttached(app_window->web_contents())) {
|
|
|