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

Unified Diff: extensions/browser/api/power/power_api.h

Issue 1902873002: Convert //extensions/browser/api 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
Index: extensions/browser/api/power/power_api.h
diff --git a/extensions/browser/api/power/power_api.h b/extensions/browser/api/power/power_api.h
index 313151d7757d4fd6a6e3a2c63819565b81cd84b4..e68bd57f6b23138cbf74ab19870dcc999d28d5e8 100644
--- a/extensions/browser/api/power/power_api.h
+++ b/extensions/browser/api/power/power_api.h
@@ -6,11 +6,11 @@
#define EXTENSIONS_BROWSER_API_POWER_POWER_API_H_
#include <map>
+#include <memory>
#include <string>
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "content/public/browser/power_save_blocker.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
@@ -53,10 +53,11 @@ class PowerReleaseKeepAwakeFunction : public SyncExtensionFunction {
class PowerAPI : public BrowserContextKeyedAPI,
public extensions::ExtensionRegistryObserver {
public:
- typedef base::Callback<scoped_ptr<content::PowerSaveBlocker>(
+ typedef base::Callback<std::unique_ptr<content::PowerSaveBlocker>(
content::PowerSaveBlocker::PowerSaveBlockerType,
content::PowerSaveBlocker::Reason,
- const std::string&)> CreateBlockerFunction;
+ const std::string&)>
+ CreateBlockerFunction;
static PowerAPI* Get(content::BrowserContext* context);
@@ -103,7 +104,7 @@ class PowerAPI : public BrowserContextKeyedAPI,
// actually changing the system power-saving settings.
CreateBlockerFunction create_blocker_function_;
- scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
+ std::unique_ptr<content::PowerSaveBlocker> power_save_blocker_;
// Current level used by |power_save_blocker_|. Meaningless if
// |power_save_blocker_| is NULL.

Powered by Google App Engine
This is Rietveld 408576698