OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/common/pref_names.h" | 5 #include "chrome/common/pref_names.h" |
6 | 6 |
7 namespace prefs { | 7 namespace prefs { |
8 | 8 |
9 // *************** PROFILE PREFS *************** | 9 // *************** PROFILE PREFS *************** |
10 // These are attached to the user profile | 10 // These are attached to the user profile |
(...skipping 28 matching lines...) Expand all Loading... |
39 // The URLs to restore on startup or when the home button is pressed. The URLs | 39 // The URLs to restore on startup or when the home button is pressed. The URLs |
40 // are only restored on startup if kRestoreOnStartup is 4. | 40 // are only restored on startup if kRestoreOnStartup is 4. |
41 const char kURLsToRestoreOnStartup[] = "session.urls_to_restore_on_startup"; | 41 const char kURLsToRestoreOnStartup[] = "session.urls_to_restore_on_startup"; |
42 | 42 |
43 // The application locale. | 43 // The application locale. |
44 // For OS_CHROMEOS we maintain kApplicationLocale property in both local state | 44 // For OS_CHROMEOS we maintain kApplicationLocale property in both local state |
45 // and user's profile. Global property determines locale of login screen, | 45 // and user's profile. Global property determines locale of login screen, |
46 // while user's profile determines his personal locale preference. | 46 // while user's profile determines his personal locale preference. |
47 const char kApplicationLocale[] = "intl.app_locale"; | 47 const char kApplicationLocale[] = "intl.app_locale"; |
48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
49 // Non-syncable item. Used to detect locale change. | |
50 // Used for two-step initialization of locale in ChromeOS | |
51 // because synchronization of kApplicationLocale is not instant. | |
52 const char kApplicationLocaleBackup[] = "intl.app_locale_backup"; | |
53 // Non-syncable item. | |
54 // Used to locally override synchronized kApplicationLocale preference. | |
55 const char kApplicationLocaleOverride[] = "intl.app_locale_override"; | |
56 // Locale accepted by user. Non-syncable. | 49 // Locale accepted by user. Non-syncable. |
57 // Used to determine whether we need to show Locale Change notification. | 50 // Used to determine whether we need to show Locale Change notification. |
58 const char kApplicationLocaleAccepted[] = "intl.app_locale_accepted"; | 51 const char kApplicationLocaleAccepted[] = "intl.app_locale_accepted"; |
| 52 // Non-syncable item. |
| 53 // It is used in two distinct ways. |
| 54 // (1) Used for two-step initialization of locale in ChromeOS |
| 55 // because synchronization of kApplicationLocale is not instant. |
| 56 // (2) Used to detect locale change. Locale change is detected by |
| 57 // LocaleChangeGuard in case values of kApplicationLocaleBackup and |
| 58 // kApplicationLocale are both non-empty and differ. |
| 59 // Following is a table showing how state of those prefs may change upon |
| 60 // common real-life use cases: |
| 61 // AppLocale Backup Accepted |
| 62 // Initial login - A - |
| 63 // Sync B A - |
| 64 // Accept (B) B B B |
| 65 // ----------------------------------------------------------- |
| 66 // Initial login - A - |
| 67 // No sync and second login A A - |
| 68 // Change options B B - |
| 69 // ----------------------------------------------------------- |
| 70 // Initial login - A - |
| 71 // Sync A A - |
| 72 // Locale changed on login screen A C - |
| 73 // Accept (A) A A A |
| 74 // ----------------------------------------------------------- |
| 75 // Initial login - A - |
| 76 // Sync B A - |
| 77 // Revert A A - |
| 78 const char kApplicationLocaleBackup[] = "intl.app_locale_backup"; |
59 #endif | 79 #endif |
60 | 80 |
61 // The default character encoding to assume for a web page in the | 81 // The default character encoding to assume for a web page in the |
62 // absence of MIME charset specification | 82 // absence of MIME charset specification |
63 const char kDefaultCharset[] = "intl.charset_default"; | 83 const char kDefaultCharset[] = "intl.charset_default"; |
64 | 84 |
65 // The value to use for Accept-Languages HTTP header when making an HTTP | 85 // The value to use for Accept-Languages HTTP header when making an HTTP |
66 // request. | 86 // request. |
67 const char kAcceptLanguages[] = "intl.accept_languages"; | 87 const char kAcceptLanguages[] = "intl.accept_languages"; |
68 | 88 |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 const char kManagedDefaultPluginsSetting[] = | 1220 const char kManagedDefaultPluginsSetting[] = |
1201 "profile.managed_default_content_settings.plugins"; | 1221 "profile.managed_default_content_settings.plugins"; |
1202 const char kManagedDefaultPopupsSetting[] = | 1222 const char kManagedDefaultPopupsSetting[] = |
1203 "profile.managed_default_content_settings.popups"; | 1223 "profile.managed_default_content_settings.popups"; |
1204 | 1224 |
1205 // Dictionary for storing the set of known background pages (keys are extension | 1225 // Dictionary for storing the set of known background pages (keys are extension |
1206 // IDs of background page owners, value is a boolean that is true if the user | 1226 // IDs of background page owners, value is a boolean that is true if the user |
1207 // needs to acknowledge this page. | 1227 // needs to acknowledge this page. |
1208 const char kKnownBackgroundPages[] = "background_pages.known"; | 1228 const char kKnownBackgroundPages[] = "background_pages.known"; |
1209 } // namespace prefs | 1229 } // namespace prefs |
OLD | NEW |