OLD | NEW |
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 "extensions/browser/api/socket/udp_socket.h" | 5 #include "extensions/browser/api/socket/udp_socket.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
| 9 #include "base/lazy_instance.h" |
9 #include "extensions/browser/api/api_resource.h" | 10 #include "extensions/browser/api/api_resource.h" |
10 #include "net/base/ip_endpoint.h" | 11 #include "net/base/ip_endpoint.h" |
11 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
12 #include "net/udp/datagram_socket.h" | 13 #include "net/udp/datagram_socket.h" |
13 #include "net/udp/udp_client_socket.h" | 14 #include "net/udp/udp_client_socket.h" |
14 | 15 |
15 namespace extensions { | 16 namespace extensions { |
16 | 17 |
17 static base::LazyInstance< | 18 static base::LazyInstance< |
18 BrowserContextKeyedAPIFactory<ApiResourceManager<ResumableUDPSocket> > > | 19 BrowserContextKeyedAPIFactory<ApiResourceManager<ResumableUDPSocket> > > |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 288 |
288 ResumableUDPSocket::ResumableUDPSocket(const std::string& owner_extension_id) | 289 ResumableUDPSocket::ResumableUDPSocket(const std::string& owner_extension_id) |
289 : UDPSocket(owner_extension_id), | 290 : UDPSocket(owner_extension_id), |
290 persistent_(false), | 291 persistent_(false), |
291 buffer_size_(0), | 292 buffer_size_(0), |
292 paused_(false) {} | 293 paused_(false) {} |
293 | 294 |
294 bool ResumableUDPSocket::IsPersistent() const { return persistent(); } | 295 bool ResumableUDPSocket::IsPersistent() const { return persistent(); } |
295 | 296 |
296 } // namespace extensions | 297 } // namespace extensions |
OLD | NEW |