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

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

Issue 1503583002: [Extensions Views] Update the extension installed bubble's sync promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years 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_installed_bubble.cc
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.cc b/chrome/browser/ui/extensions/extension_installed_bubble.cc
index 0f8accb2e09fab452697abde4c1c0dbc23b6e4da..e9ba2b98d80110d2a9b5d4c0462c464c189567a9 100644
--- a/chrome/browser/ui/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/extensions/extension_installed_bubble.cc
@@ -56,6 +56,8 @@ class ExtensionInstalledBubbleObserver
content::Source<Browser>(bubble_->browser()));
}
+ void Run() { OnExtensionLoaded(nullptr, bubble_->extension()); }
+
private:
~ExtensionInstalledBubbleObserver() override {}
@@ -169,8 +171,13 @@ void ExtensionInstalledBubble::ShowBubble(
const SkBitmap& icon) {
// The ExtensionInstalledBubbleObserver will delete itself when the
// ExtensionInstalledBubble is shown or when it can't be shown anymore.
- new ExtensionInstalledBubbleObserver(
+ auto x = new ExtensionInstalledBubbleObserver(
make_scoped_ptr(new ExtensionInstalledBubble(extension, browser, icon)));
+ extensions::ExtensionRegistry* reg =
+ extensions::ExtensionRegistry::Get(browser->profile());
+ if (reg->enabled_extensions().GetByID(extension->id())) {
+ x->Run();
+ }
}
ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension,
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h ('k') | chrome/browser/ui/sync/bubble_sync_promo_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698