Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: chrome/utility/shell_handler_impl_win.cc

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/utility/shell_handler_impl_win.cc
diff --git a/chrome/utility/shell_handler_impl_win.cc b/chrome/utility/shell_handler_impl_win.cc
index 6bcacda2359a3382f734cebdb0367763f29f7c10..ffd8f420e8ccc445c19f10231fd14abd1d067cd9 100644
--- a/chrome/utility/shell_handler_impl_win.cc
+++ b/chrome/utility/shell_handler_impl_win.cc
@@ -17,6 +17,7 @@
#include "base/win/shortcut.h"
#include "chrome/installer/util/install_util.h"
#include "content/public/utility/utility_thread.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
namespace {
@@ -206,16 +207,16 @@ bool IsPinnedToTaskbarHelper::GetResult() {
} // namespace
+ShellHandlerImpl::ShellHandlerImpl() = default;
+
+ShellHandlerImpl::~ShellHandlerImpl() = default;
+
// static
void ShellHandlerImpl::Create(mojom::ShellHandlerRequest request) {
- new ShellHandlerImpl(std::move(request));
+ mojo::MakeStrongBinding(base::MakeUnique<ShellHandlerImpl>(),
+ std::move(request));
}
-ShellHandlerImpl::ShellHandlerImpl(mojom::ShellHandlerRequest request)
- : binding_(this, std::move(request)) {}
-
-ShellHandlerImpl::~ShellHandlerImpl() = default;
-
void ShellHandlerImpl::IsPinnedToTaskbar(
const IsPinnedToTaskbarCallback& callback) {
IsPinnedToTaskbarHelper helper;
« no previous file with comments | « chrome/utility/shell_handler_impl_win.h ('k') | components/contextual_search/browser/contextual_search_js_api_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698