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

Side by Side Diff: components/cast_channel/cast_socket_service.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: fix buildbot compile errors Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "extensions/browser/api/cast_channel/cast_socket_service.h" 5 #include "components/cast_channel/cast_socket_service.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 using content::BrowserThread; 10 using content::BrowserThread;
11 11
12 namespace extensions {
13 namespace api {
14 namespace cast_channel { 12 namespace cast_channel {
15 13
16 int CastSocketService::last_channel_id_ = 0; 14 int CastSocketService::last_channel_id_ = 0;
17 15
18 CastSocketService::CastSocketService() 16 CastSocketService::CastSocketService()
19 : RefcountedKeyedService( 17 : RefcountedKeyedService(
20 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) { 18 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) {
21 DETACH_FROM_THREAD(thread_checker_); 19 DETACH_FROM_THREAD(thread_checker_);
22 } 20 }
23 21
(...skipping 26 matching lines...) Expand all
50 CastSocket* CastSocketService::GetSocket(int channel_id) const { 48 CastSocket* CastSocketService::GetSocket(int channel_id) const {
51 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); 49 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
52 DCHECK(channel_id > 0); 50 DCHECK(channel_id > 0);
53 const auto& socket_it = sockets_.find(channel_id); 51 const auto& socket_it = sockets_.find(channel_id);
54 return socket_it == sockets_.end() ? nullptr : socket_it->second.get(); 52 return socket_it == sockets_.end() ? nullptr : socket_it->second.get();
55 } 53 }
56 54
57 void CastSocketService::ShutdownOnUIThread() {} 55 void CastSocketService::ShutdownOnUIThread() {}
58 56
59 } // namespace cast_channel 57 } // namespace cast_channel
60 } // namespace api
61 } // namespace extensions
OLDNEW
« no previous file with comments | « components/cast_channel/cast_socket_service.h ('k') | components/cast_channel/cast_socket_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698