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

Unified Diff: content/browser/power_save_blocker_x11.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/browser/power_save_blocker_impl.cc ('k') | content/browser/power_usage_monitor_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/power_save_blocker_x11.cc
diff --git a/content/browser/power_save_blocker_x11.cc b/content/browser/power_save_blocker_x11.cc
index babc81488a09c7cd05fe6cbc455ba1aa7b1d763d..e80265c5a77be304961290a0a321a8c83f6caa88 100644
--- a/content/browser/power_save_blocker_x11.cc
+++ b/content/browser/power_save_blocker_x11.cc
@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/power_save_blocker_impl.h"
-
#include <X11/Xlib.h>
-#include <stdint.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/scrnsaver.h>
+#include <stdint.h>
+
+#include <memory>
+
+#include "content/browser/power_save_blocker_impl.h"
// Xlib #defines Status, but we can't have that for some of our headers.
#ifdef Status
#undef Status
@@ -21,7 +23,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/nix/xdg_util.h"
#include "base/synchronization/lock.h"
@@ -236,8 +237,8 @@ void PowerSaveBlockerImpl::Delegate::ApplyBlock() {
bus_ = new dbus::Bus(options);
scoped_refptr<dbus::ObjectProxy> object_proxy;
- scoped_ptr<dbus::MethodCall> method_call;
- scoped_ptr<dbus::MessageWriter> message_writer;
+ std::unique_ptr<dbus::MethodCall> method_call;
+ std::unique_ptr<dbus::MessageWriter> message_writer;
switch (api_) {
case NO_API:
@@ -347,7 +348,7 @@ void PowerSaveBlockerImpl::Delegate::RemoveBlock() {
}
scoped_refptr<dbus::ObjectProxy> object_proxy;
- scoped_ptr<dbus::MethodCall> method_call;
+ std::unique_ptr<dbus::MethodCall> method_call;
switch (api_) {
case NO_API:
@@ -448,7 +449,7 @@ bool PowerSaveBlockerImpl::Delegate::XSSAvailable() {
// static
DBusAPI PowerSaveBlockerImpl::Delegate::SelectAPI() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
switch (base::nix::GetDesktopEnvironment(env.get())) {
case base::nix::DESKTOP_ENVIRONMENT_GNOME:
case base::nix::DESKTOP_ENVIRONMENT_UNITY:
« no previous file with comments | « content/browser/power_save_blocker_impl.cc ('k') | content/browser/power_usage_monitor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698