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

Unified Diff: chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc

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_display_private_api.cc
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc
index 74a0164cfd7ae66f1ad03fab951751d405079db6..ad56f81e9e7017f24e931797c5447a8044671eb8 100644
--- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc
+++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc
@@ -33,7 +33,7 @@ class BrailleDisplayPrivateAPI::DefaultEventDelegate
DefaultEventDelegate(EventRouter::Observer* observer, Profile* profile);
~DefaultEventDelegate() override;
- void BroadcastEvent(scoped_ptr<Event> event) override;
+ void BroadcastEvent(std::unique_ptr<Event> event) override;
bool HasListener() override;
private:
@@ -65,7 +65,7 @@ BrailleDisplayPrivateAPI::GetFactoryInstance() {
void BrailleDisplayPrivateAPI::OnBrailleDisplayStateChanged(
const DisplayState& display_state) {
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(events::BRAILLE_DISPLAY_PRIVATE_ON_DISPLAY_STATE_CHANGED,
OnDisplayStateChanged::kEventName,
OnDisplayStateChanged::Create(display_state)));
@@ -76,7 +76,7 @@ void BrailleDisplayPrivateAPI::OnBrailleKeyEvent(const KeyEvent& key_event) {
// Key events only go to extensions of the active profile.
if (!IsProfileActive())
return;
- scoped_ptr<Event> event(
+ std::unique_ptr<Event> event(
new Event(events::BRAILLE_DISPLAY_PRIVATE_ON_KEY_EVENT,
OnKeyEvent::kEventName, OnKeyEvent::Create(key_event)));
event_delegate_->BroadcastEvent(std::move(event));
@@ -102,7 +102,7 @@ bool BrailleDisplayPrivateAPI::IsProfileActive() {
}
void BrailleDisplayPrivateAPI::SetEventDelegateForTest(
- scoped_ptr<EventDelegate> delegate) {
+ std::unique_ptr<EventDelegate> delegate) {
event_delegate_ = std::move(delegate);
}
@@ -135,7 +135,7 @@ BrailleDisplayPrivateAPI::DefaultEventDelegate::~DefaultEventDelegate() {
}
void BrailleDisplayPrivateAPI::DefaultEventDelegate::BroadcastEvent(
- scoped_ptr<Event> event) {
+ std::unique_ptr<Event> event) {
EventRouter::Get(profile_)->BroadcastEvent(std::move(event));
}

Powered by Google App Engine
This is Rietveld 408576698