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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 11597010: Automate more Better Session Restore tests: Crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/ui/startup/startup_browser_creator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698