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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2644643003: Send CrashReporting notification from didCommitNavigationWithDetails:. (Closed)
Patch Set: Fixed compilation Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 0cd014850758d3ecda2fb692610d6995f64f01f3..8d3dfee2392431cc13e8cd68e0c087d3e36b26e7 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1768,7 +1768,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
// |disableFullScreen| is called only from one place.
[fullScreenController_ disableFullScreen];
[findInPageController_ disableFindInPageWithCompletionHandler:nil];
- [autoReloadBridge_ loadStartedForURL:webState->GetLastCommittedURL()];
+ GURL lastCommittedURL = webState->GetLastCommittedURL();
+ [autoReloadBridge_ loadStartedForURL:lastCommittedURL];
if (isUserNavigationEvent_) {
[[NSNotificationCenter defaultCenter]
@@ -1784,7 +1785,7 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
favicon::FaviconDriver* faviconDriver =
favicon::WebFaviconDriver::FromWebState(webState);
if (faviconDriver) {
- faviconDriver->FetchFavicon(webState->GetLastCommittedURL());
+ faviconDriver->FetchFavicon(lastCommittedURL);
}
[parentTabModel_ notifyTabChanged:self];
if (parentTabModel_) {
@@ -1794,6 +1795,17 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
userInfo:@{kTabModelTabKey : self}];
}
[parentTabModel_ navigationCommittedInTab:self];
+
+ // Sending a notification about the url change for crash reporting.
+ // TODO(crbug.com/661675): Consider using the navigation entry committed
+ // notification now that it's in the right place.
+ NSString* URLSpec = base::SysUTF8ToNSString(lastCommittedURL.spec());
+ if (URLSpec.length) {
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting
+ object:self
+ userInfo:@{kTabUrlKey : URLSpec}];
+ }
}
// Called when the page URL has changed.
@@ -1803,18 +1815,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[self addCurrentEntryToHistoryDB];
[self countMainFrameLoad];
}
-
- // Sending a notification about the url change for crash reporting.
- // TODO(crbug.com/661675): Consider using the navigation entry committed
- // notification now that it's in the right place.
- NSString* urlString = base::SysUTF8ToNSString(currentUrl.spec());
- if ([urlString length]) {
- [[NSNotificationCenter defaultCenter]
- postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting
- object:self
- userInfo:[NSDictionary dictionaryWithObject:urlString
- forKey:kTabUrlKey]];
- }
}
- (void)webState:(web::WebState*)webState
« 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