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

Unified Diff: chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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: chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h b/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h
index 63f87acc09008c1107f29f639c129401931d67a3..aafa57d7b468bb230ebe7c8dc941159f62189187 100644
--- a/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h
+++ b/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.h
@@ -5,10 +5,11 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER_BRLAPI_H_
#define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRAILLE_CONTROLLER_BRLAPI_H_
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/files/file_path_watcher.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "chrome/browser/extensions/api/braille_display_private/braille_controller.h"
@@ -23,7 +24,7 @@ namespace braille_display_private {
class BrailleControllerImpl : public BrailleController {
public:
static BrailleControllerImpl* GetInstance();
- scoped_ptr<DisplayState> GetDisplayState() override;
+ std::unique_ptr<DisplayState> GetDisplayState() override;
void WriteDots(const std::vector<char>& cells) override;
void AddObserver(BrailleObserver* observer) override;
void RemoveObserver(BrailleObserver* observer) override;
@@ -37,7 +38,7 @@ class BrailleControllerImpl : public BrailleController {
~BrailleControllerImpl() override;
void TryLoadLibBrlApi();
- typedef base::Callback<scoped_ptr<BrlapiConnection>()>
+ typedef base::Callback<std::unique_ptr<BrlapiConnection>()>
CreateBrlapiConnectionFunction;
// For dependency injection in tests. Sets the function used to create
@@ -59,16 +60,16 @@ class BrailleControllerImpl : public BrailleController {
void ResetRetryConnectHorizon();
void ScheduleTryToConnect();
void Disconnect();
- scoped_ptr<BrlapiConnection> CreateBrlapiConnection();
+ std::unique_ptr<BrlapiConnection> CreateBrlapiConnection();
void DispatchKeys();
- void DispatchKeyEvent(scoped_ptr<KeyEvent> event);
- void DispatchOnDisplayStateChanged(scoped_ptr<DisplayState> new_state);
+ void DispatchKeyEvent(std::unique_ptr<KeyEvent> event);
+ void DispatchOnDisplayStateChanged(std::unique_ptr<DisplayState> new_state);
CreateBrlapiConnectionFunction create_brlapi_connection_function_;
// Manipulated on the IO thread.
LibBrlapiLoader libbrlapi_loader_;
- scoped_ptr<BrlapiConnection> connection_;
+ std::unique_ptr<BrlapiConnection> connection_;
bool started_connecting_;
bool connect_scheduled_;
base::Time retry_connect_horizon_;

Powered by Google App Engine
This is Rietveld 408576698