1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SESSION_STARTUP_PREF_H__
6 #define CHROME_BROWSER_SESSION_STARTUP_PREF_H__
10 #include "googleurl/src/gurl.h"
15 // StartupPref specifies what should happen at startup for a specified profile.
16 // StartupPref is stored in the preferences for a particular profile.
17 struct SessionStartupPref
{
19 // Indicates the user doesn't want to restore a previous session.
22 // Indicates the user wants to restore the last session.
25 // Indicates the user wants to restore a specific set of URLs. The URLs
26 // are contained in urls.
30 static void RegisterUserPrefs(PrefService
* prefs
);
32 // What should happen on startup for the specified profile.
33 static void SetStartupPref(Profile
* profile
, const SessionStartupPref
& pref
);
34 static void SetStartupPref(PrefService
* prefs
, const SessionStartupPref
& pref
);
35 static SessionStartupPref
GetStartupPref(Profile
* profile
);
36 static SessionStartupPref
GetStartupPref(PrefService
* prefs
);
38 SessionStartupPref() : type(DEFAULT
) {}
40 explicit SessionStartupPref(Type type
) : type(type
) {}
42 // What to do on startup.
45 // The URLs to restore. Only used if type == URLS.
46 std::vector
<GURL
> urls
;
49 #endif // CHROME_BROWSER_SESSION_STARTUP_PREF_H__