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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 // Returns true iff the master preferences were successfully read from a file. | 158 // Returns true iff the master preferences were successfully read from a file. |
159 bool read_from_file() const { | 159 bool read_from_file() const { |
160 return preferences_read_from_file_; | 160 return preferences_read_from_file_; |
161 } | 161 } |
162 | 162 |
163 bool install_chrome() const { | 163 bool install_chrome() const { |
164 return chrome_; | 164 return chrome_; |
165 } | 165 } |
166 | 166 |
| 167 bool install_chrome_app_host() const { |
| 168 return chrome_app_host_; |
| 169 } |
| 170 |
167 bool install_chrome_frame() const { | 171 bool install_chrome_frame() const { |
168 return chrome_frame_; | 172 return chrome_frame_; |
169 } | 173 } |
170 | 174 |
171 bool is_multi_install() const { | 175 bool is_multi_install() const { |
172 return multi_install_; | 176 return multi_install_; |
173 } | 177 } |
174 | 178 |
175 // Returns a static preference object that has been initialized with the | 179 // Returns a static preference object that has been initialized with the |
176 // CommandLine object for the current process. | 180 // CommandLine object for the current process. |
177 // NOTE: Must not be called before CommandLine::Init() is called! | 181 // NOTE: Must not be called before CommandLine::Init() is called! |
178 // OTHER NOTE: Not thread safe. | 182 // OTHER NOTE: Not thread safe. |
179 static const MasterPreferences& ForCurrentProcess(); | 183 static const MasterPreferences& ForCurrentProcess(); |
180 | 184 |
181 protected: | 185 protected: |
182 void InitializeProductFlags(); | 186 void InitializeProductFlags(); |
183 | 187 |
184 void InitializeFromCommandLine(const CommandLine& cmd_line); | 188 void InitializeFromCommandLine(const CommandLine& cmd_line); |
185 | 189 |
186 protected: | 190 protected: |
187 scoped_ptr<base::DictionaryValue> master_dictionary_; | 191 scoped_ptr<base::DictionaryValue> master_dictionary_; |
188 base::DictionaryValue* distribution_; | 192 base::DictionaryValue* distribution_; |
189 bool preferences_read_from_file_; | 193 bool preferences_read_from_file_; |
190 bool chrome_; | 194 bool chrome_; |
| 195 bool chrome_app_host_; |
191 bool chrome_frame_; | 196 bool chrome_frame_; |
192 bool multi_install_; | 197 bool multi_install_; |
193 | 198 |
194 private: | 199 private: |
195 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 200 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
196 }; | 201 }; |
197 | 202 |
198 } // namespace installer | 203 } // namespace installer |
199 | 204 |
200 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 205 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
OLD | NEW |