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

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

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android 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 unified diff | Download patch
« no previous file with comments | « media/base/media_log.cc ('k') | media/base/media_tracks.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MEDIA_LOG_EVENT_H_ 5 #ifndef MEDIA_BASE_MEDIA_LOG_EVENT_H_
6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_ 6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory>
9 10
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 13
13 namespace media { 14 namespace media {
14 15
15 struct MediaLogEvent { 16 struct MediaLogEvent {
16 MediaLogEvent() {} 17 MediaLogEvent() {}
17 18
18 MediaLogEvent(const MediaLogEvent& event) { 19 MediaLogEvent(const MediaLogEvent& event) {
19 *this = event; 20 *this = event;
20 } 21 }
21 22
22 MediaLogEvent& operator=(const MediaLogEvent& event) { 23 MediaLogEvent& operator=(const MediaLogEvent& event) {
23 id = event.id; 24 id = event.id;
24 type = event.type; 25 type = event.type;
25 scoped_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy()); 26 std::unique_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy());
26 params.Swap(event_copy.get()); 27 params.Swap(event_copy.get());
27 time = event.time; 28 time = event.time;
28 return *this; 29 return *this;
29 } 30 }
30 31
31 enum Type { 32 enum Type {
32 // A WebMediaPlayer is being created or destroyed. 33 // A WebMediaPlayer is being created or destroyed.
33 // params: none. 34 // params: none.
34 WEBMEDIAPLAYER_CREATED, 35 WEBMEDIAPLAYER_CREATED,
35 WEBMEDIAPLAYER_DESTROYED, 36 WEBMEDIAPLAYER_DESTROYED,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 int32_t id; 101 int32_t id;
101 Type type; 102 Type type;
102 base::DictionaryValue params; 103 base::DictionaryValue params;
103 base::TimeTicks time; 104 base::TimeTicks time;
104 }; 105 };
105 106
106 } // namespace media 107 } // namespace media
107 108
108 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ 109 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_
OLDNEW
« no previous file with comments | « media/base/media_log.cc ('k') | media/base/media_tracks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698