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 | |
171 bool install_chrome_frame() const { | 167 bool install_chrome_frame() const { |
172 return chrome_frame_; | 168 return chrome_frame_; |
173 } | 169 } |
174 | 170 |
175 bool is_multi_install() const { | 171 bool is_multi_install() const { |
176 return multi_install_; | 172 return multi_install_; |
177 } | 173 } |
178 | 174 |
179 // Returns a static preference object that has been initialized with the | 175 // Returns a static preference object that has been initialized with the |
180 // CommandLine object for the current process. | 176 // CommandLine object for the current process. |
181 // NOTE: Must not be called before CommandLine::Init() is called! | 177 // NOTE: Must not be called before CommandLine::Init() is called! |
182 // OTHER NOTE: Not thread safe. | 178 // OTHER NOTE: Not thread safe. |
183 static const MasterPreferences& ForCurrentProcess(); | 179 static const MasterPreferences& ForCurrentProcess(); |
184 | 180 |
185 protected: | 181 protected: |
186 void InitializeProductFlags(); | 182 void InitializeProductFlags(); |
187 | 183 |
188 void InitializeFromCommandLine(const CommandLine& cmd_line); | 184 void InitializeFromCommandLine(const CommandLine& cmd_line); |
189 | 185 |
190 protected: | 186 protected: |
191 scoped_ptr<base::DictionaryValue> master_dictionary_; | 187 scoped_ptr<base::DictionaryValue> master_dictionary_; |
192 base::DictionaryValue* distribution_; | 188 base::DictionaryValue* distribution_; |
193 bool preferences_read_from_file_; | 189 bool preferences_read_from_file_; |
194 bool chrome_; | 190 bool chrome_; |
195 bool chrome_app_host_; | |
196 bool chrome_frame_; | 191 bool chrome_frame_; |
197 bool multi_install_; | 192 bool multi_install_; |
198 | 193 |
199 private: | 194 private: |
200 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 195 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
201 }; | 196 }; |
202 | 197 |
203 } // namespace installer | 198 } // namespace installer |
204 | 199 |
205 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 200 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
OLD | NEW |