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