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 "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // Whether the startup type and URLs are managed via policy. | 64 // Whether the startup type and URLs are managed via policy. |
65 static bool TypeIsManaged(PrefService* prefs); | 65 static bool TypeIsManaged(PrefService* prefs); |
66 static bool URLsAreManaged(PrefService* prefs); | 66 static bool URLsAreManaged(PrefService* prefs); |
67 | 67 |
68 // Whether the startup type has not been overridden from its default. | 68 // Whether the startup type has not been overridden from its default. |
69 static bool TypeIsDefault(PrefService* prefs); | 69 static bool TypeIsDefault(PrefService* prefs); |
70 | 70 |
71 // Converts an integer pref value to a SessionStartupPref::Type. | 71 // Converts an integer pref value to a SessionStartupPref::Type. |
72 static SessionStartupPref::Type PrefValueToType(int pref_value); | 72 static SessionStartupPref::Type PrefValueToType(int pref_value); |
73 | 73 |
74 // Returns |true| if a change to startup type or URLS was detected by | |
75 // ProtectorService. | |
76 static bool DidStartupPrefChange(Profile* profile); | |
77 | |
78 // Returns the protected backup of startup type and URLS. | |
79 static SessionStartupPref GetStartupPrefBackup(Profile* profile); | |
80 | |
81 explicit SessionStartupPref(Type type); | 74 explicit SessionStartupPref(Type type); |
82 | 75 |
83 ~SessionStartupPref(); | 76 ~SessionStartupPref(); |
84 | 77 |
85 // What to do on startup. | 78 // What to do on startup. |
86 Type type; | 79 Type type; |
87 | 80 |
88 // The URLs to restore. Only used if type == URLS. | 81 // The URLs to restore. Only used if type == URLS. |
89 std::vector<GURL> urls; | 82 std::vector<GURL> urls; |
90 }; | 83 }; |
91 | 84 |
92 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ | 85 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ |
OLD | NEW |