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

Unified Diff: net/socket_stream/socket_stream_job.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket_stream/socket_stream_job.h ('k') | net/socket_stream/socket_stream_job_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream_job.cc
diff --git a/net/socket_stream/socket_stream_job.cc b/net/socket_stream/socket_stream_job.cc
deleted file mode 100644
index 66da741b41882d263de4a83c6770abbcfe00d51d..0000000000000000000000000000000000000000
--- a/net/socket_stream/socket_stream_job.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/socket_stream/socket_stream_job.h"
-
-#include "base/memory/singleton.h"
-#include "net/http/transport_security_state.h"
-#include "net/socket_stream/socket_stream_job_manager.h"
-#include "net/ssl/ssl_config_service.h"
-#include "net/url_request/url_request_context.h"
-
-namespace net {
-
-// static
-SocketStreamJob::ProtocolFactory* SocketStreamJob::RegisterProtocolFactory(
- const std::string& scheme, ProtocolFactory* factory) {
- return SocketStreamJobManager::GetInstance()->RegisterProtocolFactory(
- scheme, factory);
-}
-
-// static
-SocketStreamJob* SocketStreamJob::CreateSocketStreamJob(
- const GURL& url,
- SocketStream::Delegate* delegate,
- TransportSecurityState* sts,
- SSLConfigService* ssl,
- URLRequestContext* context,
- CookieStore* cookie_store) {
- GURL socket_url(url);
- if (url.scheme() == "ws" && sts &&
- sts->ShouldUpgradeToSSL(url.host())) {
- url::Replacements<char> replacements;
- static const char kNewScheme[] = "wss";
- replacements.SetScheme(kNewScheme, url::Component(0, strlen(kNewScheme)));
- socket_url = url.ReplaceComponents(replacements);
- }
- return SocketStreamJobManager::GetInstance()->CreateJob(
- socket_url, delegate, context, cookie_store);
-}
-
-SocketStreamJob::SocketStreamJob() {}
-
-SocketStream::UserData* SocketStreamJob::GetUserData(const void* key) const {
- return socket_->GetUserData(key);
-}
-
-void SocketStreamJob::SetUserData(const void* key,
- SocketStream::UserData* data) {
- socket_->SetUserData(key, data);
-}
-
-void SocketStreamJob::Connect() {
- socket_->Connect();
-}
-
-bool SocketStreamJob::SendData(const char* data, int len) {
- return socket_->SendData(data, len);
-}
-
-void SocketStreamJob::Close() {
- socket_->Close();
-}
-
-void SocketStreamJob::RestartWithAuth(const AuthCredentials& credentials) {
- socket_->RestartWithAuth(credentials);
-}
-
-void SocketStreamJob::CancelWithError(int error) {
- socket_->CancelWithError(error);
-}
-
-void SocketStreamJob::CancelWithSSLError(const net::SSLInfo& ssl_info) {
- socket_->CancelWithSSLError(ssl_info);
-}
-
-void SocketStreamJob::ContinueDespiteError() {
- socket_->ContinueDespiteError();
-}
-
-void SocketStreamJob::DetachDelegate() {
- socket_->DetachDelegate();
-}
-
-void SocketStreamJob::DetachContext() {
- if (socket_.get())
- socket_->DetachContext();
-}
-
-SocketStreamJob::~SocketStreamJob() {}
-
-} // namespace net
« no previous file with comments | « net/socket_stream/socket_stream_job.h ('k') | net/socket_stream/socket_stream_job_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698