| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 LAST, | 27 LAST, |
| 28 | 28 |
| 29 // Indicates the user wants to restore a specific set of URLs. The URLs | 29 // Indicates the user wants to restore a specific set of URLs. The URLs |
| 30 // are contained in urls. | 30 // are contained in urls. |
| 31 URLS, | 31 URLS, |
| 32 | 32 |
| 33 // Number of values in this enum. | 33 // Number of values in this enum. |
| 34 TYPE_COUNT | 34 TYPE_COUNT |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // For historical reasons the enum and value registered in the prefs don't |
| 38 // line up. These are the values registered in prefs. |
| 39 static const int kPrefValueHomePage = 0; // Deprecated |
| 40 static const int kPrefValueLast = 1; |
| 41 static const int kPrefValueURLs = 4; |
| 42 static const int kPrefValueNewTab = 5; |
| 43 |
| 37 static void RegisterUserPrefs(PrefService* prefs); | 44 static void RegisterUserPrefs(PrefService* prefs); |
| 38 | 45 |
| 39 // Returns the default value for |type|. | 46 // Returns the default value for |type|. |
| 40 static Type GetDefaultStartupType(); | 47 static Type GetDefaultStartupType(); |
| 41 | 48 |
| 42 // What should happen on startup for the specified profile. | 49 // What should happen on startup for the specified profile. |
| 43 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); | 50 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); |
| 44 static void SetStartupPref(PrefService* prefs, | 51 static void SetStartupPref(PrefService* prefs, |
| 45 const SessionStartupPref& pref); | 52 const SessionStartupPref& pref); |
| 46 static SessionStartupPref GetStartupPref(Profile* profile); | 53 static SessionStartupPref GetStartupPref(Profile* profile); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 65 ~SessionStartupPref(); | 72 ~SessionStartupPref(); |
| 66 | 73 |
| 67 // What to do on startup. | 74 // What to do on startup. |
| 68 Type type; | 75 Type type; |
| 69 | 76 |
| 70 // The URLs to restore. Only used if type == URLS. | 77 // The URLs to restore. Only used if type == URLS. |
| 71 std::vector<GURL> urls; | 78 std::vector<GURL> urls; |
| 72 }; | 79 }; |
| 73 | 80 |
| 74 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 81 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
| OLD | NEW |