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

Side by Side Diff: ui/ozone/public/ozone_platform.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 unified diff | Download patch
« no previous file with comments | « ui/ozone/public/ozone_platform.h ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "ui/events/devices/device_data_manager.h" 8 #include "ui/events/devices/device_data_manager.h"
9 #include "ui/ozone/platform_object.h" 9 #include "ui/ozone/platform_object.h"
10 #include "ui/ozone/platform_selection.h" 10 #include "ui/ozone/platform_selection.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return instance_; 59 return instance_;
60 } 60 }
61 61
62 // static 62 // static
63 void OzonePlatform::CreateInstance() { 63 void OzonePlatform::CreateInstance() {
64 if (!instance_) { 64 if (!instance_) {
65 TRACE_EVENT1("ozone", 65 TRACE_EVENT1("ozone",
66 "OzonePlatform::Initialize", 66 "OzonePlatform::Initialize",
67 "platform", 67 "platform",
68 GetOzonePlatformName()); 68 GetOzonePlatformName());
69 scoped_ptr<OzonePlatform> platform = 69 std::unique_ptr<OzonePlatform> platform =
70 PlatformObject<OzonePlatform>::Create(); 70 PlatformObject<OzonePlatform>::Create();
71 71
72 // TODO(spang): Currently need to leak this object. 72 // TODO(spang): Currently need to leak this object.
73 OzonePlatform* pl = platform.release(); 73 OzonePlatform* pl = platform.release();
74 DCHECK_EQ(instance_, pl); 74 DCHECK_EQ(instance_, pl);
75 } 75 }
76 } 76 }
77 77
78 // static 78 // static
79 OzonePlatform* OzonePlatform::instance_; 79 OzonePlatform* OzonePlatform::instance_;
80 80
81 } // namespace ui 81 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/public/ozone_platform.h ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698