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

Side by Side Diff: components/cronet/ios/cronet_environment.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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/ios/cronet_environment.h" 5 #include "components/cronet/ios/cronet_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 new net::HttpCache(http_network_session, std::move(main_backend), 333 new net::HttpCache(http_network_session, std::move(main_backend),
334 true /* set_up_quic_server_info */); 334 true /* set_up_quic_server_info */);
335 main_context_->set_http_transaction_factory(main_cache); 335 main_context_->set_http_transaction_factory(main_cache);
336 336
337 net::URLRequestJobFactoryImpl* job_factory = 337 net::URLRequestJobFactoryImpl* job_factory =
338 new net::URLRequestJobFactoryImpl; 338 new net::URLRequestJobFactoryImpl;
339 main_context_->set_job_factory(job_factory); 339 main_context_->set_job_factory(job_factory);
340 main_context_->set_net_log(net_log_.get()); 340 main_context_->set_net_log(net_log_.get());
341 } 341 }
342 342
343 std::string CronetEnvironment::user_agent() { 343 std::string CronetEnvironment::UserAgent() {
344 const net::HttpUserAgentSettings* user_agent_settings = 344 const net::HttpUserAgentSettings* user_agent_settings =
345 main_context_->http_user_agent_settings(); 345 main_context_->http_user_agent_settings();
346 if (!user_agent_settings) { 346 if (!user_agent_settings) {
347 return nullptr; 347 return nullptr;
348 } 348 }
349 349
350 return user_agent_settings->GetUserAgent(); 350 return user_agent_settings->GetUserAgent();
351 } 351 }
352 352
353 } // namespace cronet 353 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698