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