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 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 | 17 |
18 class FilePath; | |
19 | |
20 namespace base { | 18 namespace base { |
21 class DictionaryValue; | 19 class DictionaryValue; |
| 20 class FilePath; |
22 } | 21 } |
23 | 22 |
24 namespace installer { | 23 namespace installer { |
25 | 24 |
26 #if !defined(OS_MACOSX) | 25 #if !defined(OS_MACOSX) |
27 // This is the default name for the master preferences file used to pre-set | 26 // This is the default name for the master preferences file used to pre-set |
28 // values in the user profile at first run. | 27 // values in the user profile at first run. |
29 const char kDefaultMasterPrefs[] = "master_preferences"; | 28 const char kDefaultMasterPrefs[] = "master_preferences"; |
30 #endif | 29 #endif |
31 | 30 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 83 |
85 // Parses the command line and optionally reads the master preferences file | 84 // Parses the command line and optionally reads the master preferences file |
86 // to get distribution related install options (if the "installerdata" switch | 85 // to get distribution related install options (if the "installerdata" switch |
87 // is present in the command line. | 86 // is present in the command line. |
88 // The options from the preference file and command line are merged, with the | 87 // The options from the preference file and command line are merged, with the |
89 // ones from the command line taking precedence in case of a conflict. | 88 // ones from the command line taking precedence in case of a conflict. |
90 explicit MasterPreferences(const CommandLine& cmd_line); | 89 explicit MasterPreferences(const CommandLine& cmd_line); |
91 | 90 |
92 // Parses a specific preferences file and does not merge any command line | 91 // Parses a specific preferences file and does not merge any command line |
93 // switches with the distribution dictionary. | 92 // switches with the distribution dictionary. |
94 explicit MasterPreferences(const FilePath& prefs_path); | 93 explicit MasterPreferences(const base::FilePath& prefs_path); |
95 | 94 |
96 // Parses a preferences directly from |prefs| and does not merge any command | 95 // Parses a preferences directly from |prefs| and does not merge any command |
97 // line switches with the distribution dictionary. | 96 // line switches with the distribution dictionary. |
98 explicit MasterPreferences(const std::string& prefs); | 97 explicit MasterPreferences(const std::string& prefs); |
99 | 98 |
100 ~MasterPreferences(); | 99 ~MasterPreferences(); |
101 | 100 |
102 // Each of the Get methods below returns true if the named value was found in | 101 // Each of the Get methods below returns true if the named value was found in |
103 // the distribution dictionary and its value assigned to the 'value' | 102 // the distribution dictionary and its value assigned to the 'value' |
104 // parameter. If the value wasn't found, the return value is false. | 103 // parameter. If the value wasn't found, the return value is false. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool chrome_frame_; | 212 bool chrome_frame_; |
214 bool multi_install_; | 213 bool multi_install_; |
215 | 214 |
216 private: | 215 private: |
217 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 216 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
218 }; | 217 }; |
219 | 218 |
220 } // namespace installer | 219 } // namespace installer |
221 | 220 |
222 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 221 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
OLD | NEW |