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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2901633002: Replaced NavigationContext::IsErrorPage with NavigationContext::GetError (Closed)
Patch Set: Created 3 years, 7 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/chrome/browser/tabs/tab.h" 5 #import "ios/chrome/browser/tabs/tab.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "ios/web/public/interstitials/web_interstitial.h" 116 #include "ios/web/public/interstitials/web_interstitial.h"
117 #include "ios/web/public/load_committed_details.h" 117 #include "ios/web/public/load_committed_details.h"
118 #import "ios/web/public/navigation_manager.h" 118 #import "ios/web/public/navigation_manager.h"
119 #include "ios/web/public/referrer.h" 119 #include "ios/web/public/referrer.h"
120 #import "ios/web/public/serializable_user_data_manager.h" 120 #import "ios/web/public/serializable_user_data_manager.h"
121 #include "ios/web/public/ssl_status.h" 121 #include "ios/web/public/ssl_status.h"
122 #include "ios/web/public/url_scheme_util.h" 122 #include "ios/web/public/url_scheme_util.h"
123 #include "ios/web/public/url_util.h" 123 #include "ios/web/public/url_util.h"
124 #include "ios/web/public/web_client.h" 124 #include "ios/web/public/web_client.h"
125 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" 125 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
126 #include "ios/web/public/web_state/navigation_context.h" 126 #import "ios/web/public/web_state/navigation_context.h"
127 #import "ios/web/public/web_state/ui/crw_generic_content_view.h" 127 #import "ios/web/public/web_state/ui/crw_generic_content_view.h"
128 #include "ios/web/public/web_state/web_state.h" 128 #include "ios/web/public/web_state/web_state.h"
129 #import "ios/web/public/web_state/web_state_observer_bridge.h" 129 #import "ios/web/public/web_state/web_state_observer_bridge.h"
130 #include "ios/web/public/web_thread.h" 130 #include "ios/web/public/web_thread.h"
131 #import "ios/web/web_state/ui/crw_web_controller.h" 131 #import "ios/web/web_state/ui/crw_web_controller.h"
132 #import "ios/web/web_state/web_state_impl.h" 132 #import "ios/web/web_state/web_state_impl.h"
133 #include "net/base/escape.h" 133 #include "net/base/escape.h"
134 #include "net/base/filename_util.h" 134 #include "net/base/filename_util.h"
135 #import "net/base/mac/url_conversions.h" 135 #import "net/base/mac/url_conversions.h"
136 #include "net/base/net_errors.h" 136 #include "net/base/net_errors.h"
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1157
1158 - (void)webState:(web::WebState*)webState 1158 - (void)webState:(web::WebState*)webState
1159 didFinishNavigation:(web::NavigationContext*)navigation { 1159 didFinishNavigation:(web::NavigationContext*)navigation {
1160 if (navigation->IsSameDocument()) { 1160 if (navigation->IsSameDocument()) {
1161 // Fetch the favicon for the new URL. 1161 // Fetch the favicon for the new URL.
1162 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); 1162 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState);
1163 if (faviconDriver) 1163 if (faviconDriver)
1164 faviconDriver->FetchFavicon(navigation->GetUrl()); 1164 faviconDriver->FetchFavicon(navigation->GetUrl());
1165 } 1165 }
1166 1166
1167 if (!navigation->IsErrorPage()) { 1167 if (!navigation->GetError()) {
1168 [self addCurrentEntryToHistoryDB]; 1168 [self addCurrentEntryToHistoryDB];
1169 [self countMainFrameLoad]; 1169 [self countMainFrameLoad];
1170 } 1170 }
1171 1171
1172 [_parentTabModel notifyTabChanged:self]; 1172 [_parentTabModel notifyTabChanged:self];
1173 } 1173 }
1174 1174
1175 // Records metric for the interface's orientation. 1175 // Records metric for the interface's orientation.
1176 - (void)recordInterfaceOrientation { 1176 - (void)recordInterfaceOrientation {
1177 switch ([[UIApplication sharedApplication] statusBarOrientation]) { 1177 switch ([[UIApplication sharedApplication] statusBarOrientation]) {
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 1899
1900 - (TabModel*)parentTabModel { 1900 - (TabModel*)parentTabModel {
1901 return _parentTabModel; 1901 return _parentTabModel;
1902 } 1902 }
1903 1903
1904 - (FormInputAccessoryViewController*)inputAccessoryViewController { 1904 - (FormInputAccessoryViewController*)inputAccessoryViewController {
1905 return _inputAccessoryViewController; 1905 return _inputAccessoryViewController;
1906 } 1906 }
1907 1907
1908 @end 1908 @end
OLDNEW
« no previous file with comments | « components/translate/ios/browser/language_detection_controller.mm ('k') | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698