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

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

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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 | « media/base/android/media_source_player.cc ('k') | media/base/serial_runner.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 #ifndef MEDIA_BASE_SERIAL_RUNNER_H_ 5 #ifndef MEDIA_BASE_SERIAL_RUNNER_H_
6 #define MEDIA_BASE_SERIAL_RUNNER_H_ 6 #define MEDIA_BASE_SERIAL_RUNNER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const Queue& bound_fns, const PipelineStatusCB& done_cb); 64 const Queue& bound_fns, const PipelineStatusCB& done_cb);
65 65
66 private: 66 private:
67 friend struct base::DefaultDeleter<SerialRunner>; 67 friend struct base::DefaultDeleter<SerialRunner>;
68 68
69 SerialRunner(const Queue& bound_fns, const PipelineStatusCB& done_cb); 69 SerialRunner(const Queue& bound_fns, const PipelineStatusCB& done_cb);
70 ~SerialRunner(); 70 ~SerialRunner();
71 71
72 void RunNextInSeries(PipelineStatus last_status); 72 void RunNextInSeries(PipelineStatus last_status);
73 73
74 base::WeakPtrFactory<SerialRunner> weak_this_;
75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 74 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
76 Queue bound_fns_; 75 Queue bound_fns_;
77 PipelineStatusCB done_cb_; 76 PipelineStatusCB done_cb_;
78 77
78 // NOTE: Weak pointers must be invalidated before all other member variables.
79 base::WeakPtrFactory<SerialRunner> weak_factory_;
80
79 DISALLOW_COPY_AND_ASSIGN(SerialRunner); 81 DISALLOW_COPY_AND_ASSIGN(SerialRunner);
80 }; 82 };
81 83
82 } // namespace media 84 } // namespace media
83 85
84 #endif // MEDIA_BASE_SERIAL_RUNNER_H_ 86 #endif // MEDIA_BASE_SERIAL_RUNNER_H_
OLDNEW
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | media/base/serial_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698