Index: chrome/browser/ui/startup/startup_browser_creator.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc |
index 6501714bd9654c823d22c2dc3129be8e8f035423..043aa82761bfb603234c0a559fb115e17d3412e1 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc |
@@ -130,7 +130,7 @@ class ProfileLaunchObserver : public content::NotificationObserver { |
} |
} |
- bool HasBeenLaunched(const Profile* profile) { |
+ bool HasBeenLaunched(const Profile* profile) const { |
return launched_profiles.find(profile) != launched_profiles.end(); |
} |
@@ -138,6 +138,10 @@ class ProfileLaunchObserver : public content::NotificationObserver { |
launched_profiles.insert(profile); |
} |
+ void Clear() { |
+ launched_profiles.clear(); |
+ } |
+ |
private: |
std::set<const Profile*> launched_profiles; |
content::NotificationRegistrar registrar_; |
@@ -267,6 +271,11 @@ SessionStartupPref StartupBrowserCreator::GetSessionStartupPref( |
return pref; |
} |
+// static |
+void StartupBrowserCreator::ClearLaunchedProfilesForTesting() { |
+ profile_launch_observer.Get().Clear(); |
+} |
+ |
std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( |
const CommandLine& command_line, |
const FilePath& cur_dir, |