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

Unified Diff: content/browser/gamepad/gamepad_provider.h

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
Index: content/browser/gamepad/gamepad_provider.h
diff --git a/content/browser/gamepad/gamepad_provider.h b/content/browser/gamepad/gamepad_provider.h
index fa15411184708702b818132678c6e747ee7eeb82..916138986aa57bec04e4ef94199cf4d00199dff5 100644
--- a/content/browser/gamepad/gamepad_provider.h
+++ b/content/browser/gamepad/gamepad_provider.h
@@ -5,13 +5,13 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_
+#include <memory>
#include <utility>
#include <vector>
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
@@ -35,7 +35,7 @@ class CONTENT_EXPORT GamepadProvider :
GamepadProvider();
// Manually specifies the data fetcher. Used for testing.
- explicit GamepadProvider(scoped_ptr<GamepadDataFetcher> fetcher);
+ explicit GamepadProvider(std::unique_ptr<GamepadDataFetcher> fetcher);
~GamepadProvider() override;
@@ -59,11 +59,11 @@ class CONTENT_EXPORT GamepadProvider :
void OnDevicesChanged(base::SystemMonitor::DeviceType type) override;
private:
- void Initialize(scoped_ptr<GamepadDataFetcher> fetcher);
+ void Initialize(std::unique_ptr<GamepadDataFetcher> fetcher);
// Method for setting up the platform-specific data fetcher. Takes ownership
// of |fetcher|.
- void DoInitializePollingThread(scoped_ptr<GamepadDataFetcher> fetcher);
+ void DoInitializePollingThread(std::unique_ptr<GamepadDataFetcher> fetcher);
// Method for sending pause hints to the low-level data fetcher. Runs on
// polling_thread_.
@@ -147,16 +147,16 @@ class CONTENT_EXPORT GamepadProvider :
};
// Used to detect connections and disconnections.
- scoped_ptr<PadState[]> pad_states_;
+ std::unique_ptr<PadState[]> pad_states_;
// Only used on the polling thread.
- scoped_ptr<GamepadDataFetcher> data_fetcher_;
+ std::unique_ptr<GamepadDataFetcher> data_fetcher_;
base::Lock shared_memory_lock_;
base::SharedMemory gamepad_shared_memory_;
// Polling is done on this background thread.
- scoped_ptr<base::Thread> polling_thread_;
+ std::unique_ptr<base::Thread> polling_thread_;
static GamepadProvider* instance_;
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_win.h ('k') | content/browser/gamepad/gamepad_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698