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

Unified Diff: tonic/dart_library_loader.cc

Issue 1244983003: Make mojo dart controller depend on tonic and get building without wtf (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « tonic/dart_converter_wtf.cc ('k') | tonic/dart_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tonic/dart_library_loader.cc
diff --git a/tonic/dart_library_loader.cc b/tonic/dart_library_loader.cc
index a6492ad8835ba97c85850bc94b0d58c6e51a0924..dbb73f771b96799badf671969008fb6055b3b781 100644
--- a/tonic/dart_library_loader.cc
+++ b/tonic/dart_library_loader.cc
@@ -56,7 +56,8 @@ class DartLibraryLoader::Job : public DartDependency,
loader_->DidFailJob(this);
return;
}
- drainer_ = adoptPtr(new DataPipeDrainer(this, pipe.Pass()));
+ drainer_ = std::unique_ptr<DataPipeDrainer>(
+ new DataPipeDrainer(this, pipe.Pass()));
}
// DataPipeDrainer::Client
@@ -67,7 +68,7 @@ class DartLibraryLoader::Job : public DartDependency,
// Subclasses must implement OnDataComplete.
std::string name_;
- OwnPtr<DataPipeDrainer> drainer_;
+ std::unique_ptr<DataPipeDrainer> drainer_;
base::WeakPtrFactory<Job> weak_factory_;
};
@@ -150,7 +151,8 @@ class DartLibraryLoader::WatcherSignaler {
WatcherSignaler(DartLibraryLoader& loader,
DartDependency* resolved_dependency)
: loader_(loader),
- catcher_(adoptPtr(new DartDependencyCatcher(loader))),
+ catcher_(std::unique_ptr<DartDependencyCatcher>(
+ new DartDependencyCatcher(loader))),
resolved_dependency_(resolved_dependency) {}
~WatcherSignaler() {
@@ -164,7 +166,7 @@ class DartLibraryLoader::WatcherSignaler {
// Notice that we remove the dependency catcher and extract all the
// callbacks before running any of them. We don't want to be re-entered
// below the callbacks and end up in an inconsistent state.
- catcher_.clear();
+ catcher_.reset();
std::vector<base::Closure> callbacks;
for (const auto& watcher : completed_watchers) {
callbacks.push_back(watcher->callback());
@@ -178,7 +180,7 @@ class DartLibraryLoader::WatcherSignaler {
private:
DartLibraryLoader& loader_;
- OwnPtr<DartDependencyCatcher> catcher_;
+ std::unique_ptr<DartDependencyCatcher> catcher_;
DartDependency* resolved_dependency_;
};
« no previous file with comments | « tonic/dart_converter_wtf.cc ('k') | tonic/dart_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698