| OLD | NEW |
| 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 #include "chrome/test/chromedriver/net/sync_websocket_factory.h" | 5 #include "chrome/test/chromedriver/net/sync_websocket_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/test/chromedriver/net/sync_websocket_impl.h" | 9 #include "chrome/test/chromedriver/net/sync_websocket_impl.h" |
| 10 #include "chrome/test/chromedriver/net/url_request_context_getter.h" | 10 #include "chrome/test/chromedriver/net/url_request_context_getter.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 scoped_ptr<SyncWebSocket> CreateSyncWebSocket( | 14 scoped_ptr<SyncWebSocket> CreateSyncWebSocket( |
| 15 scoped_refptr<URLRequestContextGetter> context_getter) { | 15 scoped_refptr<URLRequestContextGetter> context_getter) { |
| 16 return scoped_ptr<SyncWebSocket>(new SyncWebSocketImpl(context_getter)); | 16 return scoped_ptr<SyncWebSocket>(new SyncWebSocketImpl(context_getter.get())); |
| 17 } | 17 } |
| 18 | 18 |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 SyncWebSocketFactory CreateSyncWebSocketFactory( | 21 SyncWebSocketFactory CreateSyncWebSocketFactory( |
| 22 URLRequestContextGetter* getter) { | 22 URLRequestContextGetter* getter) { |
| 23 return base::Bind(&CreateSyncWebSocket, make_scoped_refptr(getter)); | 23 return base::Bind(&CreateSyncWebSocket, make_scoped_refptr(getter)); |
| 24 } | 24 } |
| OLD | NEW |