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

Unified Diff: chrome/browser/chrome_browser_main_win.cc

Issue 12334096: Regularize ownerships and lifecycle for storage monitor platform classes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Document lifecycle in storage_monitor.h Created 7 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
Index: chrome/browser/chrome_browser_main_win.cc
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index cbe174ad272ad94899e05a57876614ab4e341b12..ea30847e5ba94be17b57f7e594abf9fa45506850 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -199,8 +199,6 @@ void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() {
// Make sure that we know how to handle exceptions from the message loop.
InitializeWindowProcExceptions();
}
- removable_device_notifications_window_.reset(
- chrome::RemovableDeviceNotificationsWindowWin::Create());
}
void ChromeBrowserMainPartsWin::PostMainMessageLoopStart() {
@@ -218,10 +216,17 @@ void ChromeBrowserMainPartsWin::PostMainMessageLoopStart() {
}
}
-void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() {
- ChromeBrowserMainParts::PreMainMessageLoopRun();
+void ChromeBrowserMainPartsWin::PreProfileInit() {
+ removable_device_notifications_window_.reset(
+ chrome::RemovableDeviceNotificationsWindowWin::Create());
+ ChromeBrowserMainParts::PreProfileInit();
+}
+
+void ChromeBrowserMainPartsWin::PostProfileInit() {
removable_device_notifications_window_->Init();
+
+ ChromeBrowserMainParts::PostProfileInit();
}
void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() {

Powered by Google App Engine
This is Rietveld 408576698