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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2672673002: Removed investigation CHECK from didCommitNavigation. (Closed)
Patch Set: Removed unused method Created 3 years, 10 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 | « no previous file | ios/web/web_state/ui/crw_wk_navigation_states.h » ('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 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/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 4843 matching lines...) Expand 10 before | Expand all | Expand 10 after
4854 } 4854 }
4855 4855
4856 // This must be reset at the end, since code above may need information about 4856 // This must be reset at the end, since code above may need information about
4857 // the pending load. 4857 // the pending load.
4858 _pendingNavigationInfo.reset(); 4858 _pendingNavigationInfo.reset();
4859 _certVerificationErrors->Clear(); 4859 _certVerificationErrors->Clear();
4860 } 4860 }
4861 4861
4862 - (void)webView:(WKWebView*)webView 4862 - (void)webView:(WKWebView*)webView
4863 didCommitNavigation:(WKNavigation*)navigation { 4863 didCommitNavigation:(WKNavigation*)navigation {
4864 // This method will crash if |currentSessionEntry| is null. If this check is
4865 // hit it means that |didStartProvisionalNavigation| was called as expected
4866 // but it did not call |registerLoadRequest|. TODO(crbug.com/676721): remove
4867 // this CHECK once there is at least one crash on this line (which means that
4868 // |didStartProvisionalNavigation| did not call |registerLoadRequest| and it
4869 // should be fixed.
4870 CHECK([self currentSessionEntry] || !navigation ||
4871 [_navigationStates stateForNavigation:navigation] ==
4872 web::WKNavigationState::STARTED);
4873
4874 [_navigationStates setState:web::WKNavigationState::COMMITTED 4864 [_navigationStates setState:web::WKNavigationState::COMMITTED
4875 forNavigation:navigation]; 4865 forNavigation:navigation];
4876 4866
4877 DCHECK_EQ(_webView, webView); 4867 DCHECK_EQ(_webView, webView);
4878 _certVerificationErrors->Clear(); 4868 _certVerificationErrors->Clear();
4879 4869
4880 // This is the point where the document's URL has actually changed, and 4870 // This is the point where the document's URL has actually changed, and
4881 // pending navigation information should be applied to state information. 4871 // pending navigation information should be applied to state information.
4882 [self setDocumentURL:net::GURLWithNSURL([_webView URL])]; 4872 [self setDocumentURL:net::GURLWithNSURL([_webView URL])];
4883 4873
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 } 5442 }
5453 5443
5454 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5444 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5455 } 5445 }
5456 5446
5457 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5447 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5458 return [action.request valueForHTTPHeaderField:@"Referer"]; 5448 return [action.request valueForHTTPHeaderField:@"Referer"];
5459 } 5449 }
5460 5450
5461 @end 5451 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_wk_navigation_states.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698