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

Unified Diff: chrome/browser/ui/views/session_crashed_bubble_view.cc

Issue 2641813004: Convert SessionCrashedBubbleView to use the new navigation callbacks. (Closed)
Patch Set: 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 | « chrome/browser/ui/views/session_crashed_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/session_crashed_bubble_view.cc
diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.cc b/chrome/browser/ui/views/session_crashed_bubble_view.cc
index f974ac00e9f3ec8065b14015b3ce138e5dfd71de..14b487368dfd943901fa1431ef1652b45e3ffc14 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -33,6 +33,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/bubble/bubble_frame_view.h"
@@ -200,7 +201,7 @@ SessionCrashedBubbleView::SessionCrashedBubbleView(
web_contents_(web_contents),
uma_option_(NULL),
offer_uma_optin_(offer_uma_optin),
- started_navigation_(false),
+ first_navigation_ignored_(false),
restored_(false) {
set_close_on_deactivate(false);
registrar_.Add(
@@ -334,17 +335,18 @@ void SessionCrashedBubbleView::StyledLabelLinkClicked(views::StyledLabel* label,
RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP);
}
-void SessionCrashedBubbleView::DidStartNavigationToPendingEntry(
- const GURL& url,
- content::ReloadType reload_type) {
- started_navigation_ = true;
-}
-
void SessionCrashedBubbleView::DidFinishLoad(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url) {
- if (started_navigation_)
- CloseBubble();
+ if (render_frame_host->GetParent())
sky 2017/01/19 00:39:42 How come you early out if there is a parent? Isn't
jam 2017/01/19 01:06:13 It's to maintain the same behavior as before, whic
+ return;
+
+ if (!first_navigation_ignored_) {
+ first_navigation_ignored_ = true;
+ return;
+ }
+
+ CloseBubble();
}
void SessionCrashedBubbleView::WasShown() {
« no previous file with comments | « chrome/browser/ui/views/session_crashed_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698