OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 5 #ifndef CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
6 #define CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 6 #define CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 TYPE_COUNT | 37 TYPE_COUNT |
38 }; | 38 }; |
39 | 39 |
40 // For historical reasons the enum and value registered in the prefs don't | 40 // For historical reasons the enum and value registered in the prefs don't |
41 // line up. These are the values registered in prefs. | 41 // line up. These are the values registered in prefs. |
42 static const int kPrefValueHomePage = 0; // Deprecated | 42 static const int kPrefValueHomePage = 0; // Deprecated |
43 static const int kPrefValueLast = 1; | 43 static const int kPrefValueLast = 1; |
44 static const int kPrefValueURLs = 4; | 44 static const int kPrefValueURLs = 4; |
45 static const int kPrefValueNewTab = 5; | 45 static const int kPrefValueNewTab = 5; |
46 | 46 |
47 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 47 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
48 | 48 |
49 // Returns the default value for |type|. | 49 // Returns the default value for |type|. |
50 static Type GetDefaultStartupType(); | 50 static Type GetDefaultStartupType(); |
51 | 51 |
52 // What should happen on startup for the specified profile. | 52 // What should happen on startup for the specified profile. |
53 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); | 53 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); |
54 static void SetStartupPref(PrefService* prefs, | 54 static void SetStartupPref(PrefService* prefs, |
55 const SessionStartupPref& pref); | 55 const SessionStartupPref& pref); |
56 static SessionStartupPref GetStartupPref(Profile* profile); | 56 static SessionStartupPref GetStartupPref(Profile* profile); |
57 static SessionStartupPref GetStartupPref(PrefService* prefs); | 57 static SessionStartupPref GetStartupPref(PrefService* prefs); |
(...skipping 22 matching lines...) Expand all Loading... |
80 ~SessionStartupPref(); | 80 ~SessionStartupPref(); |
81 | 81 |
82 // What to do on startup. | 82 // What to do on startup. |
83 Type type; | 83 Type type; |
84 | 84 |
85 // The URLs to restore. Only used if type == URLS. | 85 // The URLs to restore. Only used if type == URLS. |
86 std::vector<GURL> urls; | 86 std::vector<GURL> urls; |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 89 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
OLD | NEW |