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

Unified Diff: chrome/browser/extensions/extension_view_host.cc

Issue 964193002: Cleanup/ Remove deprecated extension notification from ExtensionHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/extensions/extension_view_host.h ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_view_host.cc
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
index ee79ebafe31f5ac45f5017955c3c299640a33b16..1d0ef9cfbf0982b1701585bd0e624751c1f584da 100644
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -107,9 +107,9 @@ void ExtensionViewHost::LoadInitialURL() {
if (!ExtensionSystem::Get(browser_context())->
runtime_data()->IsBackgroundPageReady(extension())) {
// Make sure the background page loads before any others.
- registrar()->Add(this,
- extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
- content::Source<Extension>(extension()));
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
+ content::Source<Extension>(extension()));
return;
}
@@ -296,13 +296,11 @@ WebContents* ExtensionViewHost::GetVisibleWebContents() const {
void ExtensionViewHost::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY) {
- DCHECK(ExtensionSystem::Get(browser_context())->
- runtime_data()->IsBackgroundPageReady(extension()));
- LoadInitialURL();
- return;
- }
- ExtensionHost::Observe(type, source, details);
+ DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY);
+ DCHECK(ExtensionSystem::Get(browser_context())
+ ->runtime_data()
+ ->IsBackgroundPageReady(extension()));
+ LoadInitialURL();
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_view_host.h ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698