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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 7717025: Do not initialize event routers in the Profile Import process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: reset will_import_ value when import complete. Created 9 years, 4 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/profiles/profile_manager.h ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
===================================================================
--- chrome/browser/profiles/profile_manager.cc (revision 97857)
+++ chrome/browser/profiles/profile_manager.cc (working copy)
@@ -103,7 +103,8 @@
return profile_manager->GetLastUsedProfile(user_data_dir);
}
-ProfileManager::ProfileManager() : logged_in_(false) {
+ProfileManager::ProfileManager() : logged_in_(false),
+ will_import_(false) {
BrowserList::AddObserver(this);
#if defined(OS_CHROMEOS)
registrar_.Add(
@@ -340,6 +341,19 @@
#endif
}
+void ProfileManager::SetWillImport() {
+ will_import_ = true;
+}
+
+void ProfileManager::OnImportFinished(Profile* profile) {
+ will_import_ = false;
+ DCHECK(profile);
+ NotificationService::current()->Notify(
+ chrome::NOTIFICATION_IMPORT_FINISHED,
+ Source<Profile>(profile),
+ NotificationService::NoDetails());
+}
+
void ProfileManager::OnBrowserAdded(const Browser* browser) {}
void ProfileManager::OnBrowserRemoved(const Browser* browser) {}
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698