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