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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 345713005: Make sure MediaStreamManager handles requests in order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment. Created 6 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: content/browser/renderer_host/media/media_stream_manager.h
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index 2d2ec87f2eb406a0cdb51b8e351bf7949be49ecd..1de659c39375d9e5bec9a7c8f4b552343667b3b2 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -26,9 +26,10 @@
#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
-#include <map>
+#include <list>
#include <set>
#include <string>
+#include <utility>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -228,7 +229,10 @@ class CONTENT_EXPORT MediaStreamManager
StreamDeviceInfoArray devices;
};
- typedef std::map<std::string, DeviceRequest*> DeviceRequests;
+ // |DeviceRequests| is a list to ensure requests are processed in the order
+ // they arrive. The first member of the pair is the label of the
+ // |DeviceRequest|.
+ typedef std::list<std::pair<std::string, DeviceRequest*> > DeviceRequests;
// Initializes the device managers on IO thread. Auto-starts the device
// thread and registers this as a listener with the device managers.

Powered by Google App Engine
This is Rietveld 408576698