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

Side by Side Diff: webkit/media/simple_data_source.h

Issue 9344003: Fix re-entrancy bug in SimpleDataSource::Abort() introduced in r118338. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/media/simple_data_source.cc » ('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 // An extremely simple implementation of DataSource that downloads the entire 5 // An extremely simple implementation of DataSource that downloads the entire
6 // media resource into memory before signaling that initialization has finished. 6 // media resource into memory before signaling that initialization has finished.
7 // Primarily used to test <audio> and <video> with buffering/caching removed 7 // Primarily used to test <audio> and <video> with buffering/caching removed
8 // from the equation. 8 // from the equation.
9 9
10 #ifndef WEBKIT_MEDIA_SIMPLE_DATA_SOURCE_H_ 10 #ifndef WEBKIT_MEDIA_SIMPLE_DATA_SOURCE_H_
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // webkit_glue::WebDataSource implementation. 87 // webkit_glue::WebDataSource implementation.
88 virtual void Initialize(const GURL& url, 88 virtual void Initialize(const GURL& url,
89 const media::PipelineStatusCB& callback) OVERRIDE; 89 const media::PipelineStatusCB& callback) OVERRIDE;
90 virtual bool HasSingleOrigin() OVERRIDE; 90 virtual bool HasSingleOrigin() OVERRIDE;
91 virtual void Abort() OVERRIDE; 91 virtual void Abort() OVERRIDE;
92 92
93 private: 93 private:
94 // Cancels and deletes the resource loading on the render thread. 94 // Cancels and deletes the resource loading on the render thread.
95 void CancelTask(); 95 void CancelTask();
96 void CancelTask_Locked();
96 97
97 // Perform initialization completion tasks under a lock. 98 // Perform initialization completion tasks under a lock.
98 void DoneInitialization_Locked(bool success); 99 void DoneInitialization_Locked(bool success);
99 100
100 // Update host() stats like total bytes & buffered bytes. 101 // Update host() stats like total bytes & buffered bytes.
101 void UpdateHostState(); 102 void UpdateHostState();
102 103
103 // Primarily used for asserting the bridge is loading on the render thread. 104 // Primarily used for asserting the bridge is loading on the render thread.
104 MessageLoop* render_loop_; 105 MessageLoop* render_loop_;
105 106
(...skipping 25 matching lines...) Expand all
131 132
132 // Used to ensure mocks for unittests are used instead of reset in Start(). 133 // Used to ensure mocks for unittests are used instead of reset in Start().
133 bool keep_test_loader_; 134 bool keep_test_loader_;
134 135
135 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); 136 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource);
136 }; 137 };
137 138
138 } // namespace webkit_media 139 } // namespace webkit_media
139 140
140 #endif // WEBKIT_MEDIA_SIMPLE_DATA_SOURCE_H_ 141 #endif // WEBKIT_MEDIA_SIMPLE_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/simple_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698