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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/views/event_monitor_unittest.cc ('k') | ui/views/examples/examples_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/examples_main.cc
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc
index dba6dc95282921e65d4476b2d27c0c553bf08bcd..8efd1efdd14bae9c8c78e4b454e65d0d940fc9d3 100644
--- a/ui/views/examples/examples_main.cc
+++ b/ui/views/examples/examples_main.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/i18n/icu_util.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/power_monitor/power_monitor.h"
@@ -61,7 +62,7 @@ int main(int argc, char** argv) {
// The ContextFactory must exist before any Compositors are created.
bool context_factory_for_test = false;
- scoped_ptr<ui::InProcessContextFactory> context_factory(
+ std::unique_ptr<ui::InProcessContextFactory> context_factory(
new ui::InProcessContextFactory(context_factory_for_test, nullptr));
context_factory->set_use_test_surface(false);
@@ -75,8 +76,8 @@ int main(int argc, char** argv) {
CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
- base::PowerMonitor power_monitor(make_scoped_ptr(
- new base::PowerMonitorDeviceSource));
+ base::PowerMonitor power_monitor(
+ base::WrapUnique(new base::PowerMonitorDeviceSource));
#if defined(OS_WIN)
gfx::win::MaybeInitializeDirectWrite();
@@ -94,13 +95,13 @@ int main(int argc, char** argv) {
wm::WMState wm_state;
#endif
#if !defined(OS_CHROMEOS) && defined(USE_AURA)
- scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen());
+ std::unique_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen());
gfx::Screen::SetScreenInstance(desktop_screen.get());
#endif
views::examples::ShowExamplesWindow(
views::examples::QUIT_ON_CLOSE, nullptr,
- scoped_ptr<ScopedVector<views::examples::ExampleBase>>());
+ std::unique_ptr<ScopedVector<views::examples::ExampleBase>>());
base::RunLoop().Run();
« no previous file with comments | « ui/views/event_monitor_unittest.cc ('k') | ui/views/examples/examples_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698