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

Unified Diff: ios/chrome/app/startup/network_stack_setup.mm

Issue 2627723005: Remove support for custom NSURLProtocol. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « ios/chrome/app/startup/network_stack_setup.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/startup/network_stack_setup.mm
diff --git a/ios/chrome/app/startup/network_stack_setup.mm b/ios/chrome/app/startup/network_stack_setup.mm
index 533edeea8e2378ebed09fde6ef1de161c70c8e41..93376b6d3d40b5950b47d31ad19c5901eacb2bc8 100644
--- a/ios/chrome/app/startup/network_stack_setup.mm
+++ b/ios/chrome/app/startup/network_stack_setup.mm
@@ -9,37 +9,17 @@
#include "ios/chrome/browser/chrome_url_constants.h"
#import "ios/net/empty_nsurlcache.h"
#include "ios/web/net/request_tracker_factory_impl.h"
-#include "ios/web/net/web_http_protocol_handler_delegate.h"
@implementation NetworkStackSetup
-+ (void)setUpChromeNetworkStack:
- (std::unique_ptr<web::RequestTrackerFactoryImpl>*)
- requestTrackerFactory
- httpProtocolHandlerDelegate:
- (std::unique_ptr<web::WebHTTPProtocolHandlerDelegate>*)
- httpProtocolHandlerDelegate {
++ (std::unique_ptr<web::RequestTrackerFactoryImpl>)setUpChromeNetworkStack {
// Disable the default cache.
[NSURLCache setSharedURLCache:[EmptyNSURLCache emptyNSURLCache]];
- // Configuration for the HTTP protocol handler.
- // TODO(crbug.com/585700): Remove this code.
- *httpProtocolHandlerDelegate =
- base::MakeUnique<web::WebHTTPProtocolHandlerDelegate>(
- GetApplicationContext()->GetSystemURLRequestContext());
- net::HTTPProtocolHandlerDelegate::SetInstance(
- httpProtocolHandlerDelegate->get());
-
- // Register the chrome http protocol handler to replace the default one.
- // TODO(crbug.com/665036): Move the network stack initialization to the web
- // layer.
- BOOL success = [NSURLProtocol registerClass:[CRNHTTPProtocolHandler class]];
- DCHECK(success);
- *requestTrackerFactory =
+ auto requestTrackerFactory =
base::MakeUnique<web::RequestTrackerFactoryImpl>(kChromeUIScheme);
- net::RequestTracker::SetRequestTrackerFactory(requestTrackerFactory->get());
-
- DCHECK(success);
+ net::RequestTracker::SetRequestTrackerFactory(requestTrackerFactory.get());
+ return requestTrackerFactory;
}
@end
« no previous file with comments | « ios/chrome/app/startup/network_stack_setup.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698