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

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

Issue 2772903002: Removed invalid DCHECK from |loadWithParams:|. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 NavigationManager::WebLoadParams params(originalParams); 1794 NavigationManager::WebLoadParams params(originalParams);
1795 1795
1796 // Initiating a navigation from the UI, record the current page state before 1796 // Initiating a navigation from the UI, record the current page state before
1797 // the new page loads. 1797 // the new page loads.
1798 1798
1799 [_delegate webWillInitiateLoadWithParams:params]; 1799 [_delegate webWillInitiateLoadWithParams:params];
1800 1800
1801 GURL navUrl = params.url; 1801 GURL navUrl = params.url;
1802 ui::PageTransition transition = params.transition_type; 1802 ui::PageTransition transition = params.transition_type;
1803 DCHECK(!(transition & ui::PAGE_TRANSITION_FORWARD_BACK)); 1803 DCHECK(!(transition & ui::PAGE_TRANSITION_FORWARD_BACK));
1804 // This method is allowed to handle reload only for transient items, which
1805 // is essentially loading the same URL again.
1806 DCHECK(!(transition & ui::PAGE_TRANSITION_RELOAD) ||
1807 self.navigationManagerImpl->GetTransientItem());
1808 1804
1809 BOOL initialNavigation = NO; 1805 BOOL initialNavigation = NO;
1810 // Clear transient view before making any changes to history and navigation 1806 // Clear transient view before making any changes to history and navigation
1811 // manager. TODO(stuartmorgan): Drive Transient Item clearing from 1807 // manager. TODO(stuartmorgan): Drive Transient Item clearing from
1812 // navigation system, rather than from WebController. 1808 // navigation system, rather than from WebController.
1813 [self clearTransientContentView]; 1809 [self clearTransientContentView];
1814 1810
1815 [self recordStateInHistory]; 1811 [self recordStateInHistory];
1816 1812
1817 if (!self.currentNavItem) 1813 if (!self.currentNavItem)
(...skipping 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 - (void)simulateLoadRequestWithURL:(const GURL&)URL { 5094 - (void)simulateLoadRequestWithURL:(const GURL&)URL {
5099 _lastRegisteredRequestURL = URL; 5095 _lastRegisteredRequestURL = URL;
5100 _loadPhase = web::LOAD_REQUESTED; 5096 _loadPhase = web::LOAD_REQUESTED;
5101 } 5097 }
5102 5098
5103 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { 5099 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action {
5104 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; 5100 return [action.request valueForHTTPHeaderField:kReferrerHeaderName];
5105 } 5101 }
5106 5102
5107 @end 5103 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698