Chromium Code Reviews| 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 21 matching lines...) Expand all Loading... | |
| 32 // Indicates the user wants to restore a specific set of URLs. The URLs | 32 // Indicates the user wants to restore a specific set of URLs. The URLs |
| 33 // are contained in urls. | 33 // are contained in urls. |
| 34 URLS, | 34 URLS, |
| 35 | 35 |
| 36 // Number of values in this enum. | 36 // Number of values in this enum. |
| 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 // The values are also recorded in Settings.StartupPageLoadSettings histogram, | |
| 43 // so make sure to update the histogram enum if you change these. | |
|
Mark P
2013/07/30 17:56:57
nit: the histogram enum -> histograms.xml
(that's
meacer
2013/07/30 18:41:50
Done.
| |
| 42 static const int kPrefValueHomePage = 0; // Deprecated | 44 static const int kPrefValueHomePage = 0; // Deprecated |
| 43 static const int kPrefValueLast = 1; | 45 static const int kPrefValueLast = 1; |
| 44 static const int kPrefValueURLs = 4; | 46 static const int kPrefValueURLs = 4; |
| 45 static const int kPrefValueNewTab = 5; | 47 static const int kPrefValueNewTab = 5; |
| 48 static const int kPrefValueMax = 6; | |
| 46 | 49 |
| 47 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 50 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 48 | 51 |
| 49 // Returns the default value for |type|. | 52 // Returns the default value for |type|. |
| 50 static Type GetDefaultStartupType(); | 53 static Type GetDefaultStartupType(); |
| 51 | 54 |
| 52 // What should happen on startup for the specified profile. | 55 // What should happen on startup for the specified profile. |
| 53 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); | 56 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); |
| 54 static void SetStartupPref(PrefService* prefs, | 57 static void SetStartupPref(PrefService* prefs, |
| 55 const SessionStartupPref& pref); | 58 const SessionStartupPref& pref); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 80 ~SessionStartupPref(); | 83 ~SessionStartupPref(); |
| 81 | 84 |
| 82 // What to do on startup. | 85 // What to do on startup. |
| 83 Type type; | 86 Type type; |
| 84 | 87 |
| 85 // The URLs to restore. Only used if type == URLS. | 88 // The URLs to restore. Only used if type == URLS. |
| 86 std::vector<GURL> urls; | 89 std::vector<GURL> urls; |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 92 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
| OLD | NEW |