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

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

Issue 841163002: MacViews: Fix duplicate ShowSessionCrashBubble and ShowProfileResetBubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keybinding
Patch Set: Created 5 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') | chrome/chrome_browser_ui.gypi » ('j') | 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 e6d2f11280d6018804dfc59dec89b4290da372d2..43b063d829d555557d0b4b09bd5755537447c890 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
-#include "chrome/browser/ui/startup/session_crashed_bubble.h"
#include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
@@ -132,10 +131,13 @@ class SessionCrashedBubbleView::BrowserRemovalObserver
};
// static
-void SessionCrashedBubbleView::Show(Browser* browser) {
+bool SessionCrashedBubbleView::Show(Browser* browser) {
+ if (!IsBubbleUIEnabled())
+ return false;
+
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
if (browser->profile()->IsOffTheRecord())
- return;
+ return true;
// Observes browser removal event and will be deallocated in ShowForReal.
scoped_ptr<BrowserRemovalObserver> browser_observer(
@@ -155,6 +157,8 @@ void SessionCrashedBubbleView::Show(Browser* browser) {
#else
SessionCrashedBubbleView::ShowForReal(browser_observer.Pass(), false);
#endif // defined(GOOGLE_CHROME_BUILD)
+
+ return true;
}
// static
@@ -446,11 +450,3 @@ void SessionCrashedBubbleView::RestorePreviousSession(views::Button* sender) {
void SessionCrashedBubbleView::CloseBubble() {
GetWidget()->Close();
}
-
-bool ShowSessionCrashedBubble(Browser* browser) {
- if (IsBubbleUIEnabled()) {
- SessionCrashedBubbleView::Show(browser);
- return true;
- }
- return false;
-}
« no previous file with comments | « chrome/browser/ui/views/session_crashed_bubble_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698