Fixing build: GetViewContainer changed name from under me. :)
[chromium-blink-merge.git] / chrome / browser / session_startup_pref.h
blob8a405796c126ec4eaa7be7d3648fda38a67c47d6
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__
8 #include <vector>
10 #include "googleurl/src/gurl.h"
12 class PrefService;
13 class Profile;
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 {
18 enum Type {
19 // Indicates the user doesn't want to restore a previous session.
20 DEFAULT,
22 // Indicates the user wants to restore the last session.
23 LAST,
25 // Indicates the user wants to restore a specific set of URLs. The URLs
26 // are contained in urls.
27 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.
43 Type type;
45 // The URLs to restore. Only used if type == URLS.
46 std::vector<GURL> urls;
49 #endif // CHROME_BROWSER_SESSION_STARTUP_PREF_H__