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

Side by Side Diff: ios/crnet/crnet_environment.mm

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ios/crnet/crnet_environment.h" 5 #include "ios/crnet/crnet_environment.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 [[NSUserDefaults standardUserDefaults] registerDefaults:@{ 379 [[NSUserDefaults standardUserDefaults] registerDefaults:@{
380 @"UserAgent" : [NSString stringWithUTF8String:user_agent.c_str()] 380 @"UserAgent" : [NSString stringWithUTF8String:user_agent.c_str()]
381 }]; 381 }];
382 main_context_->set_http_user_agent_settings( 382 main_context_->set_http_user_agent_settings(
383 new net::StaticHttpUserAgentSettings(acceptable_languages, user_agent)); 383 new net::StaticHttpUserAgentSettings(acceptable_languages, user_agent));
384 384
385 main_context_->set_ssl_config_service(new net::SSLConfigServiceDefaults); 385 main_context_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
386 main_context_->set_transport_security_state( 386 main_context_->set_transport_security_state(
387 new net::TransportSecurityState()); 387 new net::TransportSecurityState());
388 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); 388 http_server_properties_.reset(new net::HttpServerPropertiesImpl());
389 main_context_->set_http_server_properties( 389 main_context_->set_http_server_properties(http_server_properties_.get());
390 http_server_properties_->GetWeakPtr());
391 // TODO(rdsmith): Note that the ".release()" calls below are leaking 390 // TODO(rdsmith): Note that the ".release()" calls below are leaking
392 // the objects in question; this should be fixed by having an object 391 // the objects in question; this should be fixed by having an object
393 // corresponding to URLRequestContextStorage that actually owns those 392 // corresponding to URLRequestContextStorage that actually owns those
394 // objects. See http://crbug.com/523858. 393 // objects. See http://crbug.com/523858.
395 main_context_->set_host_resolver( 394 main_context_->set_host_resolver(
396 net::HostResolver::CreateDefaultResolver(nullptr).release()); 395 net::HostResolver::CreateDefaultResolver(nullptr).release());
397 main_context_->set_cert_verifier( 396 main_context_->set_cert_verifier(
398 net::CertVerifier::CreateDefault().release()); 397 net::CertVerifier::CreateDefault().release());
399 main_context_->set_http_auth_handler_factory( 398 main_context_->set_http_auth_handler_factory(
400 net::HttpAuthHandlerRegistryFactory::CreateDefault( 399 net::HttpAuthHandlerRegistryFactory::CreateDefault(
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 478
480 return user_agent_settings->GetUserAgent(); 479 return user_agent_settings->GetUserAgent();
481 } 480 }
482 481
483 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { 482 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) {
484 PostToNetworkThread( 483 PostToNetworkThread(
485 FROM_HERE, 484 FROM_HERE,
486 base::Bind(&net::ClearHttpCache, main_context_getter_, 485 base::Bind(&net::ClearHttpCache, main_context_getter_,
487 network_io_thread_->task_runner(), base::BindBlock(callback))); 486 network_io_thread_->task_runner(), base::BindBlock(callback)));
488 } 487 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698