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 // This file contains functions processing master preference file used by | 5 // This file contains functions processing master preference file used by |
6 // setup and first run. | 6 // setup and first run. |
7 | 7 |
8 #ifndef CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 8 #ifndef CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
9 #define CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 9 #define CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // The master preferences is a JSON file with the same entries as the | 32 // The master preferences is a JSON file with the same entries as the |
33 // 'Default\Preferences' file. This function parses the distribution | 33 // 'Default\Preferences' file. This function parses the distribution |
34 // section of the preferences file. | 34 // section of the preferences file. |
35 // | 35 // |
36 // A prototypical 'master_preferences' file looks like this: | 36 // A prototypical 'master_preferences' file looks like this: |
37 // | 37 // |
38 // { | 38 // { |
39 // "distribution": { | 39 // "distribution": { |
40 // "create_all_shortcuts": true, | 40 // "create_all_shortcuts": true, |
41 // "do_not_launch_chrome": false, | 41 // "do_not_launch_chrome": false, |
42 // "import_bookmarks": false, | |
43 // "import_bookmarks_from_file": "c:\\path", | 42 // "import_bookmarks_from_file": "c:\\path", |
44 // "import_history": false, | |
45 // "import_home_page": false, | |
46 // "import_search_engine": true, | |
47 // "make_chrome_default": false, | 43 // "make_chrome_default": false, |
48 // "make_chrome_default_for_user": true, | 44 // "make_chrome_default_for_user": true, |
49 // "ping_delay": 40, | 45 // "ping_delay": 40, |
50 // "require_eula": true, | 46 // "require_eula": true, |
51 // "show_welcome_page": true, | 47 // "show_welcome_page": true, |
52 // "skip_first_run_ui": true, | 48 // "skip_first_run_ui": true, |
53 // "system_level": false, | 49 // "system_level": false, |
54 // "verbose_logging": true, | 50 // "verbose_logging": true, |
55 // "welcome_page_on_os_upgrade_enabled": false | 51 // "welcome_page_on_os_upgrade_enabled": false |
56 // }, | 52 // }, |
57 // "browser": { | 53 // "browser": { |
58 // "show_home_button": true | 54 // "show_home_button": true |
59 // }, | 55 // }, |
60 // "bookmark_bar": { | 56 // "bookmark_bar": { |
61 // "show_on_all_tabs": true | 57 // "show_on_all_tabs": true |
62 // }, | 58 // }, |
63 // "first_run_tabs": [ | 59 // "first_run_tabs": [ |
64 // "http://gmail.com", | 60 // "http://gmail.com", |
65 // "https://igoogle.com" | 61 // "https://igoogle.com" |
66 // ], | 62 // ], |
67 // "homepage": "http://example.org", | 63 // "homepage": "http://example.org", |
68 // "homepage_is_newtabpage": false | 64 // "homepage_is_newtabpage": false, |
| 65 // "import_autofill_form_data": false, |
| 66 // "import_bookmarks": false, |
| 67 // "import_history": false, |
| 68 // "import_home_page": false, |
| 69 // "import_saved_passwords": false, |
| 70 // "import_search_engine": false |
69 // } | 71 // } |
70 // | 72 // |
71 // A reserved "distribution" entry in the file is used to group related | 73 // A reserved "distribution" entry in the file is used to group related |
72 // installation properties. This entry will be ignored at other times. | 74 // installation properties. This entry will be ignored at other times. |
73 // This function parses the 'distribution' entry and returns a combination | 75 // This function parses the 'distribution' entry and returns a combination |
74 // of MasterPrefResult. | 76 // of MasterPrefResult. |
75 | 77 |
76 class MasterPreferences { | 78 class MasterPreferences { |
77 public: | 79 public: |
78 // Construct a master preferences from the current process' current command | 80 // Construct a master preferences from the current process' current command |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 base::DictionaryValue* distribution_ = nullptr; | 204 base::DictionaryValue* distribution_ = nullptr; |
203 bool preferences_read_from_file_ = false; | 205 bool preferences_read_from_file_ = false; |
204 | 206 |
205 private: | 207 private: |
206 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 208 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
207 }; | 209 }; |
208 | 210 |
209 } // namespace installer | 211 } // namespace installer |
210 | 212 |
211 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 213 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
OLD | NEW |