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

Unified Diff: ui/gl/gl_context.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/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context.cc
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc
index 3e54ebb0b660a110a2ba2809b014f4a8bbe167da..baeb34735dc4b25fd22016849dbac88de355e78b 100644
--- a/ui/gl/gl_context.cc
+++ b/ui/gl/gl_context.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ui/gl/gl_context.h"
+
#include <string>
#include "base/bind.h"
@@ -9,10 +11,10 @@
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_local.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
@@ -128,10 +130,8 @@ const GLVersionInfo* GLContext::GetVersionInfo() {
if(!version_info_) {
std::string version = GetGLVersion();
std::string renderer = GetGLRenderer();
- version_info_ =
- make_scoped_ptr(new GLVersionInfo(
- version.c_str(), renderer.c_str(),
- GetExtensions().c_str()));
+ version_info_ = base::WrapUnique(new GLVersionInfo(
+ version.c_str(), renderer.c_str(), GetExtensions().c_str()));
}
return version_info_.get();
}
@@ -181,7 +181,7 @@ GLStateRestorer* GLContext::GetGLStateRestorer() {
}
void GLContext::SetGLStateRestorer(GLStateRestorer* state_restorer) {
- state_restorer_ = make_scoped_ptr(state_restorer);
+ state_restorer_ = base::WrapUnique(state_restorer);
}
void GLContext::SetSwapInterval(int interval) {
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698