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

Unified Diff: components/grpc_support/cronet_bidirectional_stream.cc

Issue 2273403003: Moving gRPC support interfaces out of cronet and into a new component. (Closed)
Patch Set: Add cronet_c_for_graph back to sources. Might fix GN, probably won't compile Created 4 years, 4 months 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
Index: components/grpc_support/cronet_bidirectional_stream.cc
diff --git a/components/cronet/ios/cronet_bidirectional_stream.cc b/components/grpc_support/cronet_bidirectional_stream.cc
similarity index 98%
rename from components/cronet/ios/cronet_bidirectional_stream.cc
rename to components/grpc_support/cronet_bidirectional_stream.cc
index 59a82085f8f268df0e99e330369c0642d2497126..68dba1b759512bc5389e7c089a772f055d034bd8 100644
--- a/components/cronet/ios/cronet_bidirectional_stream.cc
+++ b/components/grpc_support/cronet_bidirectional_stream.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/cronet/ios/cronet_bidirectional_stream.h"
+#include "components/grpc_support/cronet_bidirectional_stream.h"
#include <memory>
#include <string>
@@ -13,7 +13,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string_number_conversions.h"
-#include "components/cronet/ios/cronet_environment.h"
+#include "components/grpc_support/environment.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/request_priority.h"
@@ -30,7 +30,7 @@
#include "net/url_request/url_request_context.h"
#include "url/gurl.h"
-namespace cronet {
+namespace grpc_support {
CronetBidirectionalStream::WriteBuffers::WriteBuffers() {}
@@ -61,7 +61,7 @@ bool CronetBidirectionalStream::WriteBuffers::Empty() const {
}
CronetBidirectionalStream::CronetBidirectionalStream(
- CronetEnvironment* environment,
+ Environment* environment,
Delegate* delegate)
: read_state_(NOT_STARTED),
write_state_(NOT_STARTED),
@@ -245,7 +245,7 @@ void CronetBidirectionalStream::StartOnNetworkThread(
DCHECK(!bidi_stream_);
DCHECK(environment_->GetURLRequestContext());
request_info->extra_headers.SetHeaderIfMissing(
- net::HttpRequestHeaders::kUserAgent, environment_->user_agent());
+ net::HttpRequestHeaders::kUserAgent, environment_->UserAgent());
bidi_stream_.reset(new net::BidirectionalStream(
std::move(request_info), environment_->GetURLRequestContext()
->http_transaction_factory()

Powered by Google App Engine
This is Rietveld 408576698