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

Unified Diff: ui/views/examples/examples_window.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « ui/views/corewm/tooltip_controller.cc ('k') | ui/views/examples/examples_window_with_content.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/examples_window.cc
diff --git a/ui/views/examples/examples_window.cc b/ui/views/examples/examples_window.cc
index 24844d4121514937cc935ece0dbb78e2333416b8..8008979f5ed766a01670f35969e0705ca2c8e452 100644
--- a/ui/views/examples/examples_window.cc
+++ b/ui/views/examples/examples_window.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <string>
+#include <utility>
#include "base/memory/scoped_vector.h"
#include "base/strings/utf_string_conversions.h"
@@ -75,7 +76,7 @@ ScopedExamples CreateExamples() {
examples->push_back(new TreeViewExample);
examples->push_back(new VectorExample);
examples->push_back(new WidgetExample);
- return examples.Pass();
+ return examples;
}
struct ExampleTitleCompare {
@@ -91,7 +92,7 @@ ScopedExamples GetExamplesToShow(ScopedExamples extra) {
extra->weak_clear();
}
std::sort(examples->begin(), examples->end(), ExampleTitleCompare());
- return examples.Pass();
+ return examples;
}
} // namespace
@@ -132,7 +133,7 @@ class ExamplesWindowContents : public WidgetDelegateView,
operation_(operation) {
instance_ = this;
combobox_->set_listener(this);
- combobox_model_.SetExamples(examples.Pass());
+ combobox_model_.SetExamples(std::move(examples));
combobox_->ModelChanged();
set_background(Background::CreateStandardPanelBackground());
@@ -219,10 +220,11 @@ void ShowExamplesWindow(Operation operation,
if (ExamplesWindowContents::instance()) {
ExamplesWindowContents::instance()->GetWidget()->Activate();
} else {
- ScopedExamples examples(GetExamplesToShow(extra_examples.Pass()));
+ ScopedExamples examples(GetExamplesToShow(std::move(extra_examples)));
Widget* widget = new Widget;
Widget::InitParams params;
- params.delegate = new ExamplesWindowContents(operation, examples.Pass());
+ params.delegate =
+ new ExamplesWindowContents(operation, std::move(examples));
params.context = window_context;
widget->Init(params);
widget->Show();
« no previous file with comments | « ui/views/corewm/tooltip_controller.cc ('k') | ui/views/examples/examples_window_with_content.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698