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

Side by Side Diff: media/base/cdm_promise_adapter.h

Issue 1099383002: Change ScopedPtrHashMap's 2nd template parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | media/base/key_systems_support_uma.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_CDM_PROMISE_ADAPTER_H_ 5 #ifndef MEDIA_BASE_CDM_PROMISE_ADAPTER_H_
6 #define MEDIA_BASE_CDM_PROMISE_ADAPTER_H_ 6 #define MEDIA_BASE_CDM_PROMISE_ADAPTER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/containers/scoped_ptr_hash_map.h" 9 #include "base/containers/scoped_ptr_hash_map.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 void RejectPromise(uint32_t promise_id, 35 void RejectPromise(uint32_t promise_id,
36 MediaKeys::Exception exception_code, 36 MediaKeys::Exception exception_code,
37 uint32 system_code, 37 uint32 system_code,
38 const std::string& error_message); 38 const std::string& error_message);
39 39
40 // Rejects and clears all |promises_|. 40 // Rejects and clears all |promises_|.
41 void Clear(); 41 void Clear();
42 42
43 private: 43 private:
44 // A map between promise IDs and CdmPromises. It owns the CdmPromises. 44 // A map between promise IDs and CdmPromises. It owns the CdmPromises.
45 typedef base::ScopedPtrHashMap<uint32_t, CdmPromise> PromiseMap; 45 typedef base::ScopedPtrHashMap<uint32_t, scoped_ptr<CdmPromise>> PromiseMap;
46 46
47 // Finds, takes the ownership of and returns the promise for |promise_id|. 47 // Finds, takes the ownership of and returns the promise for |promise_id|.
48 // Returns null if no promise can be found. 48 // Returns null if no promise can be found.
49 scoped_ptr<CdmPromise> TakePromise(uint32_t promise_id); 49 scoped_ptr<CdmPromise> TakePromise(uint32_t promise_id);
50 50
51 uint32_t next_promise_id_; 51 uint32_t next_promise_id_;
52 PromiseMap promises_; 52 PromiseMap promises_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(CdmPromiseAdapter); 54 DISALLOW_COPY_AND_ASSIGN(CdmPromiseAdapter);
55 }; 55 };
56 56
57 } // namespace media 57 } // namespace media
58 58
59 #endif // MEDIA_BASE_CDM_PROMISE_ADAPTER_H_ 59 #endif // MEDIA_BASE_CDM_PROMISE_ADAPTER_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | media/base/key_systems_support_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698