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

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

Issue 11366074: Coalesce event router Init calls into their constructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 8 years, 1 month 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/browser_event_router.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/browser_event_router.cc
diff --git a/chrome/browser/extensions/browser_event_router.cc b/chrome/browser/extensions/browser_event_router.cc
index a47d6fbb1f097e4e3d3a460ed7ff38a40aaa6ba5..b72899252e7616c772a7a7ee8ecf31f4eba5c84a 100644
--- a/chrome/browser/extensions/browser_event_router.cc
+++ b/chrome/browser/extensions/browser_event_router.cc
@@ -74,9 +74,10 @@ DictionaryValue* BrowserEventRouter::TabEntry::DidNavigate(
return changed_properties;
}
-void BrowserEventRouter::Init() {
- if (initialized_)
- return;
+BrowserEventRouter::BrowserEventRouter(Profile* profile)
+ : profile_(profile) {
+ DCHECK(!profile->IsOffTheRecord());
+
BrowserList::AddObserver(this);
// Init() can happen after the browser is running, so catch up with any
@@ -95,14 +96,6 @@ void BrowserEventRouter::Init() {
}
}
}
-
- initialized_ = true;
-}
-
-BrowserEventRouter::BrowserEventRouter(Profile* profile)
- : initialized_(false),
- profile_(profile) {
- DCHECK(!profile->IsOffTheRecord());
}
BrowserEventRouter::~BrowserEventRouter() {
« no previous file with comments | « chrome/browser/extensions/browser_event_router.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698