OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/api/cast_channel/cast_channel_api.h" | 5 #include "chrome/browser/extensions/api/cast_channel/cast_channel_api.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" | 11 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h" |
12 #include "chrome/browser/net/chrome_net_log.h" | 12 #include "chrome/browser/net/chrome_net_log.h" |
| 13 #include "chrome/browser/profiles/profile.h" |
13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
14 #include "extensions/browser/event_router.h" | 15 #include "extensions/browser/event_router.h" |
15 #include "extensions/browser/extension_system.h" | 16 #include "extensions/browser/extension_system.h" |
16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
18 | 19 |
19 namespace extensions { | 20 namespace extensions { |
20 | 21 |
21 namespace Close = cast_channel::Close; | 22 namespace Close = cast_channel::Close; |
22 namespace OnError = cast_channel::OnError; | 23 namespace OnError = cast_channel::OnError; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 SetResultFromError(cast_channel::CHANNEL_ERROR_SOCKET_ERROR); | 260 SetResultFromError(cast_channel::CHANNEL_ERROR_SOCKET_ERROR); |
260 } else { | 261 } else { |
261 int channel_id = params_->channel.channel_id; | 262 int channel_id = params_->channel.channel_id; |
262 SetResultFromSocket(channel_id); | 263 SetResultFromSocket(channel_id); |
263 RemoveSocket(channel_id); | 264 RemoveSocket(channel_id); |
264 } | 265 } |
265 AsyncWorkCompleted(); | 266 AsyncWorkCompleted(); |
266 } | 267 } |
267 | 268 |
268 } // namespace extensions | 269 } // namespace extensions |
OLD | NEW |