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

Unified Diff: third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp
diff --git a/third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp b/third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp
index 6b79e7fd96fcc372e222a4fa7e6e6ed21dfdecbb..7b88489525d37c884d887999f65331d7ebbe9c3c 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFDatabase.cpp
@@ -29,8 +29,6 @@
#include "platform/audio/HRTFDatabase.h"
#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -41,9 +39,9 @@ const unsigned HRTFDatabase::NumberOfRawElevations = 10; // -45 -> +90 (each 15
const unsigned HRTFDatabase::InterpolationFactor = 1;
const unsigned HRTFDatabase::NumberOfTotalElevations = NumberOfRawElevations * InterpolationFactor;
-std::unique_ptr<HRTFDatabase> HRTFDatabase::create(float sampleRate)
+PassOwnPtr<HRTFDatabase> HRTFDatabase::create(float sampleRate)
{
- return wrapUnique(new HRTFDatabase(sampleRate));
+ return adoptPtr(new HRTFDatabase(sampleRate));
}
HRTFDatabase::HRTFDatabase(float sampleRate)
@@ -52,7 +50,7 @@ HRTFDatabase::HRTFDatabase(float sampleRate)
{
unsigned elevationIndex = 0;
for (int elevation = MinElevation; elevation <= MaxElevation; elevation += RawElevationAngleSpacing) {
- std::unique_ptr<HRTFElevation> hrtfElevation = HRTFElevation::createForSubject("Composite", elevation, sampleRate);
+ OwnPtr<HRTFElevation> hrtfElevation = HRTFElevation::createForSubject("Composite", elevation, sampleRate);
ASSERT(hrtfElevation.get());
if (!hrtfElevation.get())
return;
« no previous file with comments | « third_party/WebKit/Source/platform/audio/HRTFDatabase.h ('k') | third_party/WebKit/Source/platform/audio/HRTFDatabaseLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698