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

Side by Side Diff: ios/web/net/crw_url_verifying_protocol_handler.mm

Issue 1799843002: Removing StaticFileWebView vending methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GetBS() Created 4 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #import "ios/web/net/crw_url_verifying_protocol_handler.h" 5 #import "ios/web/net/crw_url_verifying_protocol_handler.h"
6 6
7 #include "base/ios/ios_util.h" 7 #include "base/ios/ios_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Injection of JavaScript into any UIWebView pre-initializes the entire 243 // Injection of JavaScript into any UIWebView pre-initializes the entire
244 // system which will save run time when user types into Omnibox and triggers 244 // system which will save run time when user types into Omnibox and triggers
245 // JavaScript injection again. 245 // JavaScript injection again.
246 + (BOOL)preInitialize { 246 + (BOOL)preInitialize {
247 if ([[CRWURLVerifyingProtocolHandlerData sharedInstance] preInitialized]) 247 if ([[CRWURLVerifyingProtocolHandlerData sharedInstance] preInitialized])
248 return YES; 248 return YES;
249 web::URLVerificationTrustLevel trustLevel; 249 web::URLVerificationTrustLevel trustLevel;
250 web::WebClient* web_client = web::GetWebClient(); 250 web::WebClient* web_client = web::GetWebClient();
251 DCHECK(web_client); 251 DCHECK(web_client);
252 base::scoped_nsobject<UIWebView> dummyWebView(web::CreateStaticFileWebView()); 252 base::scoped_nsobject<UIWebView> dummyWebView(web::CreateWebView(CGRectZero));
253 [CRWURLVerifyingProtocolHandler currentURLForWebView:dummyWebView 253 [CRWURLVerifyingProtocolHandler currentURLForWebView:dummyWebView
254 trustLevel:&trustLevel]; 254 trustLevel:&trustLevel];
255 return [[CRWURLVerifyingProtocolHandlerData sharedInstance] preInitialized]; 255 return [[CRWURLVerifyingProtocolHandlerData sharedInstance] preInitialized];
256 } 256 }
257 257
258 #pragma mark NSURLProtocol methods 258 #pragma mark NSURLProtocol methods
259 259
260 + (BOOL)canInitWithRequest:(NSURLRequest*)request { 260 + (BOOL)canInitWithRequest:(NSURLRequest*)request {
261 GURL requestURL = net::GURLWithNSURL(request.URL); 261 GURL requestURL = net::GURLWithNSURL(request.URL);
262 if (requestURL != GURL(web::kURLForVerification) && 262 if (requestURL != GURL(web::kURLForVerification) &&
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 cacheStoragePolicy:NSURLCacheStorageNotAllowed]; 306 cacheStoragePolicy:NSURLCacheStorageNotAllowed];
307 [self.client URLProtocol:self didLoadData:[NSData data]]; 307 [self.client URLProtocol:self didLoadData:[NSData data]];
308 [self.client URLProtocolDidFinishLoading:self]; 308 [self.client URLProtocolDidFinishLoading:self];
309 } 309 }
310 310
311 - (void)stopLoading { 311 - (void)stopLoading {
312 // Nothing to do. 312 // Nothing to do.
313 } 313 }
314 314
315 @end 315 @end
OLDNEW
« no previous file with comments | « ios/web/interstitials/html_web_interstitial_impl.mm ('k') | ios/web/web_state/web_view_internal_creation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698