Commit 736c0dcd authored by Prashant Malani's avatar Prashant Malani Committed by Commit Bot

Revert "midi: Use std::deque for MidiMessageQueue"

This reverts commit c3311e2b.

Reason for revert: Chromium OS can continue to use the std::deque version, since it checks out this directory at a specific commit. Chromium can revert to using the circular_deque variant.

This means that there will be a transitional discrepancy between MidiMessageQueue implementations in Chromium and Chromium OS, but
those should be resolved once libchrome in Chromium OS gets uprev-ed.

BUG=chromium:787643
TEST=None

Original change's description:
> midi: Use std::deque for MidiMessageQueue
> 
> For the purposes of this class, the semantics of circular_deque and
> std::deque are the same. Switching to std::deque will make this class
> easier to re-use outside of Chrome, by reducing its dependency on
> src/base/containers.
> 
> BUG=chromium:701005
> TEST=MIDI works on Chrome.
> 
> Change-Id: Iae83c69ef85682fbde75e6078cd5eb262b9f4082
> Reviewed-on: https://chromium-review.googlesource.com/784010
> Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#518599}

TBR=toyoshim@chromium.org,pmalani@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:701005
Change-Id: Id061ff49297b1b40b3e0417ad3022e744a7c2fa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1743035Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Prashant Malani <pmalani@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685239}
parent 7d43ddcf
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <deque>
#include <vector> #include <vector>
#include "base/containers/circular_deque.h"
#include "base/macros.h" #include "base/macros.h"
#include "media/midi/midi_export.h" #include "media/midi/midi_export.h"
...@@ -64,14 +64,7 @@ class MIDI_EXPORT MidiMessageQueue { ...@@ -64,14 +64,7 @@ class MIDI_EXPORT MidiMessageQueue {
void Get(std::vector<uint8_t>* message); void Get(std::vector<uint8_t>* message);
private: private:
// While we should be using base::circular_deque here, the Chrome OS version base::circular_deque<uint8_t> queue_;
// hasn't been upreved to contain that implementation yet. Since for the
// purposes of this class the semantics of std::deque and
// base::circular_deque are the same, we can use the former.
// Once Chrome OS has upreved to a version of libchrome which includes
// base::circular_deque, we can switch back to it.
// TODO(pmalani): http://crbug.com/787643 tracking this.
std::deque<uint8_t> queue_;
std::vector<uint8_t> next_message_; std::vector<uint8_t> next_message_;
const bool allow_running_status_; const bool allow_running_status_;
DISALLOW_COPY_AND_ASSIGN(MidiMessageQueue); DISALLOW_COPY_AND_ASSIGN(MidiMessageQueue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment