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

Side by Side Diff: chromecast/media/base/media_message_loop.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
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 #include "chromecast/media/base/media_message_loop.h" 5 #include "chromecast/media/base/media_message_loop.h"
6 6
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 8
9 namespace chromecast { 9 namespace chromecast {
10 namespace media { 10 namespace media {
11 11
12 // static 12 // static
13 scoped_refptr<base::SingleThreadTaskRunner> MediaMessageLoop::GetTaskRunner() { 13 scoped_refptr<base::SingleThreadTaskRunner> MediaMessageLoop::GetTaskRunner() {
14 return GetInstance()->thread_->task_runner(); 14 return GetInstance()->thread_->task_runner();
15 } 15 }
16 16
17 // static 17 // static
18 MediaMessageLoop* MediaMessageLoop::GetInstance() { 18 MediaMessageLoop* MediaMessageLoop::GetInstance() {
19 return Singleton<MediaMessageLoop>::get(); 19 return base::Singleton<MediaMessageLoop>::get();
20 } 20 }
21 21
22 MediaMessageLoop::MediaMessageLoop() 22 MediaMessageLoop::MediaMessageLoop()
23 : thread_(new base::Thread("CmaThread")) { 23 : thread_(new base::Thread("CmaThread")) {
24 thread_->Start(); 24 thread_->Start();
25 } 25 }
26 26
27 MediaMessageLoop::~MediaMessageLoop() { 27 MediaMessageLoop::~MediaMessageLoop() {
28 // This will automatically shutdown the thread. 28 // This will automatically shutdown the thread.
29 } 29 }
30 30
31 } // namespace media 31 } // namespace media
32 } // namespace chromecast 32 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/base/media_message_loop.h ('k') | chromeos/accelerometer/accelerometer_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698