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 20 matching lines...) Expand all Loading... |
31 | 31 |
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 // "import_bookmarks": false, | |
42 // "import_bookmarks_from_file": "c:\\path", | 41 // "import_bookmarks_from_file": "c:\\path", |
43 // "import_history": false, | |
44 // "import_home_page": false, | |
45 // "import_search_engine": true, | |
46 // "show_welcome_page": true, | 42 // "show_welcome_page": true, |
47 // "skip_first_run_ui": true, | 43 // "skip_first_run_ui": true, |
48 // "do_not_launch_chrome": false, | 44 // "do_not_launch_chrome": false, |
49 // "make_chrome_default": false, | 45 // "make_chrome_default": false, |
50 // "make_chrome_default_for_user": true, | 46 // "make_chrome_default_for_user": true, |
51 // "require_eula": true, | 47 // "require_eula": true, |
52 // "system_level": false, | 48 // "system_level": false, |
53 // "verbose_logging": true, | 49 // "verbose_logging": true, |
54 // "welcome_page_on_os_upgrade_enabled": false | 50 // "welcome_page_on_os_upgrade_enabled": false |
55 // }, | 51 // }, |
56 // "browser": { | 52 // "browser": { |
57 // "show_home_button": true | 53 // "show_home_button": true |
58 // }, | 54 // }, |
59 // "bookmark_bar": { | 55 // "bookmark_bar": { |
60 // "show_on_all_tabs": true | 56 // "show_on_all_tabs": true |
61 // }, | 57 // }, |
62 // "first_run_tabs": [ | 58 // "first_run_tabs": [ |
63 // "http://gmail.com", | 59 // "http://gmail.com", |
64 // "https://igoogle.com" | 60 // "https://igoogle.com" |
65 // ], | 61 // ], |
66 // "homepage": "http://example.org", | 62 // "homepage": "http://example.org", |
67 // "homepage_is_newtabpage": false | 63 // "homepage_is_newtabpage": false, |
| 64 // "import_autofill_form_data": false, |
| 65 // "import_bookmarks": false, |
| 66 // "import_history": false, |
| 67 // "import_home_page": false, |
| 68 // "import_saved_passwords": false, |
| 69 // "import_search_engine": false |
68 // } | 70 // } |
69 // | 71 // |
70 // A reserved "distribution" entry in the file is used to group related | 72 // A reserved "distribution" entry in the file is used to group related |
71 // installation properties. This entry will be ignored at other times. | 73 // installation properties. This entry will be ignored at other times. |
72 // This function parses the 'distribution' entry and returns a combination | 74 // This function parses the 'distribution' entry and returns a combination |
73 // of MasterPrefResult. | 75 // of MasterPrefResult. |
74 | 76 |
75 class MasterPreferences { | 77 class MasterPreferences { |
76 public: | 78 public: |
77 // Construct a master preferences from the current process' current command | 79 // Construct a master preferences from the current process' current command |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 base::DictionaryValue* distribution_ = nullptr; | 203 base::DictionaryValue* distribution_ = nullptr; |
202 bool preferences_read_from_file_ = false; | 204 bool preferences_read_from_file_ = false; |
203 | 205 |
204 private: | 206 private: |
205 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 207 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
206 }; | 208 }; |
207 | 209 |
208 } // namespace installer | 210 } // namespace installer |
209 | 211 |
210 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 212 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
OLD | NEW |