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

Unified Diff: chrome/browser/ui/extensions/extension_message_bubble_factory.cc

Issue 2350733005: [Extensions] Fix a bug in the startup pages override bubble (Closed)
Patch Set: Trim includes Created 4 years, 3 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
Index: chrome/browser/ui/extensions/extension_message_bubble_factory.cc
diff --git a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
index 949bd684efc7dc151a5403437eaafdb39936ba76..ddbfadf60e28dcca2f43f6d58079547727e2420d 100644
--- a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
+++ b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/extensions/suspicious_extension_bubble_delegate.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/common/channel_info.h"
#include "components/version_info/version_info.h"
#include "extensions/common/feature_switch.h"
@@ -133,8 +134,10 @@ ExtensionMessageBubbleFactory::GetController() {
}
if (EnableSettingsApiBubble()) {
- // No use showing this if it's not the startup of the profile.
- if (is_initial_check) {
+ // No use showing this if it's not the startup of the profile, and if the
+ // browser was restarted, then we always do a session restore (rather than
+ // showing normal startup pages).
+ if (is_initial_check && !StartupBrowserCreator::WasRestarted()) {
controller.reset(new extensions::ExtensionMessageBubbleController(
new extensions::SettingsApiBubbleDelegate(
browser_->profile(), extensions::BUBBLE_TYPE_STARTUP_PAGES),

Powered by Google App Engine
This is Rietveld 408576698