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

Unified Diff: services/shell/public/cpp/lib/message_loop_ref.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « services/shell/public/cpp/lib/interface_registry.cc ('k') | services/shell/public/cpp/lib/names.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/message_loop_ref.cc
diff --git a/services/shell/public/cpp/lib/message_loop_ref.cc b/services/shell/public/cpp/lib/message_loop_ref.cc
index 1b65eccf2292209e512afac7b8eb0c45f2607963..66116bb54309c676d6b92a0ab8ff5b52f1991a1a 100644
--- a/services/shell/public/cpp/lib/message_loop_ref.cc
+++ b/services/shell/public/cpp/lib/message_loop_ref.cc
@@ -5,9 +5,10 @@
#include "services/shell/public/cpp/message_loop_ref.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
-namespace mojo {
+namespace shell {
class MessageLoopRefImpl : public MessageLoopRef {
public:
@@ -37,7 +38,7 @@ class MessageLoopRefImpl : public MessageLoopRef {
private:
// MessageLoopRef:
- scoped_ptr<MessageLoopRef> Clone() override {
+ std::unique_ptr<MessageLoopRef> Clone() override {
if (app_task_runner_->BelongsToCurrentThread()) {
factory_->AddRef();
} else {
@@ -58,7 +59,7 @@ class MessageLoopRefImpl : public MessageLoopRef {
}
#endif
- return make_scoped_ptr(new MessageLoopRefImpl(factory_, app_task_runner_));
+ return base::WrapUnique(new MessageLoopRefImpl(factory_, app_task_runner_));
}
MessageLoopRefFactory* factory_;
@@ -74,9 +75,9 @@ class MessageLoopRefImpl : public MessageLoopRef {
MessageLoopRefFactory::MessageLoopRefFactory() {}
MessageLoopRefFactory::~MessageLoopRefFactory() {}
-scoped_ptr<MessageLoopRef> MessageLoopRefFactory::CreateRef() {
+std::unique_ptr<MessageLoopRef> MessageLoopRefFactory::CreateRef() {
AddRef();
- return make_scoped_ptr(new MessageLoopRefImpl(
+ return base::WrapUnique(new MessageLoopRefImpl(
this, base::MessageLoop::current()->task_runner()));
}
@@ -95,4 +96,4 @@ void MessageLoopRefFactory::Release() {
}
}
-} // namespace mojo
+} // namespace shell
« no previous file with comments | « services/shell/public/cpp/lib/interface_registry.cc ('k') | services/shell/public/cpp/lib/names.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698