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

Unified Diff: content/browser/hyphenation/hyphenation_impl.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
« no previous file with comments | « content/browser/hyphenation/hyphenation_impl.h ('k') | content/browser/loader/url_loader_factory_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/hyphenation/hyphenation_impl.cc
diff --git a/content/browser/hyphenation/hyphenation_impl.cc b/content/browser/hyphenation/hyphenation_impl.cc
index daac2f1017041b1ae4913254e744c1bd08bb63e0..f22a896c3239be48799b0b90a169d0605f44d926 100644
--- a/content/browser/hyphenation/hyphenation_impl.cc
+++ b/content/browser/hyphenation/hyphenation_impl.cc
@@ -12,6 +12,7 @@
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/system/platform_handle.h"
namespace {
@@ -50,14 +51,14 @@ static base::File& GetDictionaryFile(const std::string& locale) {
namespace hyphenation {
-HyphenationImpl::HyphenationImpl(blink::mojom::HyphenationRequest request)
- : binding_(this, std::move(request)) {}
+HyphenationImpl::HyphenationImpl() {}
HyphenationImpl::~HyphenationImpl() {}
// static
void HyphenationImpl::Create(blink::mojom::HyphenationRequest request) {
- new HyphenationImpl(std::move(request));
+ mojo::MakeStrongBinding(base::MakeUnique<HyphenationImpl>(),
+ std::move(request));
}
void HyphenationImpl::OpenDictionary(const mojo::String& locale,
« no previous file with comments | « content/browser/hyphenation/hyphenation_impl.h ('k') | content/browser/loader/url_loader_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698