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

Side by Side Diff: ios/web/shell/view_controller.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 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
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 #import "ios/web/shell/view_controller.h" 5 #import "ios/web/shell/view_controller.h"
6 6
7 #include "base/mac/objc_property_releaser.h" 7 #include "base/mac/objc_property_releaser.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 [[_webController view] setFrame:[_containerView bounds]]; 123 [[_webController view] setFrame:[_containerView bounds]];
124 [_containerView addSubview:[_webController view]]; 124 [_containerView addSubview:[_webController view]];
125 125
126 web::WebLoadParams params(GURL("https://dev.chromium.org/")); 126 web::WebLoadParams params(GURL("https://dev.chromium.org/"));
127 params.transition_type = ui::PAGE_TRANSITION_TYPED; 127 params.transition_type = ui::PAGE_TRANSITION_TYPED;
128 [_webController loadWithParams:params]; 128 [_webController loadWithParams:params];
129 } 129 }
130 130
131 - (void)setUpNetworkStack { 131 - (void)setUpNetworkStack {
132 // Disable the default cache. 132 // Disable the default cache.
133 [NSURLCache setSharedURLCache:nil]; 133 [NSURLCache setSharedURLCache:[[[NSURLCache alloc] init] autorelease]];
justincohen 2015/06/10 12:25:57 droger@ is this correct?
droger 2015/06/10 12:34:09 No. We don't want a cache. If we can't pass nil, w
134 134
135 _httpProtocolDelegate.reset(new web::WebHTTPProtocolHandlerDelegate( 135 _httpProtocolDelegate.reset(new web::WebHTTPProtocolHandlerDelegate(
136 _browserState->GetRequestContext())); 136 _browserState->GetRequestContext()));
137 net::HTTPProtocolHandlerDelegate::SetInstance(_httpProtocolDelegate.get()); 137 net::HTTPProtocolHandlerDelegate::SetInstance(_httpProtocolDelegate.get());
138 BOOL success = [NSURLProtocol registerClass:[CRNHTTPProtocolHandler class]]; 138 BOOL success = [NSURLProtocol registerClass:[CRNHTTPProtocolHandler class]];
139 DCHECK(success); 139 DCHECK(success);
140 // The CRWURLVerifyingProtocolHandler is used to verify URL in the 140 // The CRWURLVerifyingProtocolHandler is used to verify URL in the
141 // CRWWebController. It must be registered after the HttpProtocolHandler 141 // CRWWebController. It must be registered after the HttpProtocolHandler
142 // because handlers are called in the reverse order of declaration. 142 // because handlers are called in the reverse order of declaration.
143 success = 143 success =
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 - (void)webDidPrepareForGoBack { 325 - (void)webDidPrepareForGoBack {
326 } 326 }
327 - (int)downloadImageAtUrl:(const GURL&)url 327 - (int)downloadImageAtUrl:(const GURL&)url
328 maxBitmapSize:(uint32_t)maxBitmapSize 328 maxBitmapSize:(uint32_t)maxBitmapSize
329 callback: 329 callback:
330 (const web::WebState::ImageDownloadCallback&)callback { 330 (const web::WebState::ImageDownloadCallback&)callback {
331 return -1; 331 return -1;
332 } 332 }
333 333
334 @end 334 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698