| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 // Returns true iff the master preferences were successfully read from a file. | 165 // Returns true iff the master preferences were successfully read from a file. |
| 166 bool read_from_file() const { | 166 bool read_from_file() const { |
| 167 return preferences_read_from_file_; | 167 return preferences_read_from_file_; |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool install_chrome() const { | 170 bool install_chrome() const { |
| 171 return chrome_; | 171 return chrome_; |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool install_chrome_app_launcher() const { | |
| 175 return chrome_app_launcher_; | |
| 176 } | |
| 177 | |
| 178 bool is_multi_install() const { | 174 bool is_multi_install() const { |
| 179 return multi_install_; | 175 return multi_install_; |
| 180 } | 176 } |
| 181 | 177 |
| 182 // Returns a reference to this MasterPreferences' root dictionary of values. | 178 // Returns a reference to this MasterPreferences' root dictionary of values. |
| 183 const base::DictionaryValue& master_dictionary() const { | 179 const base::DictionaryValue& master_dictionary() const { |
| 184 return *master_dictionary_.get(); | 180 return *master_dictionary_.get(); |
| 185 } | 181 } |
| 186 | 182 |
| 187 // Returns a static preference object that has been initialized with the | 183 // Returns a static preference object that has been initialized with the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 205 | 201 |
| 206 // Removes the specified string pref from the master preferences and returns | 202 // Removes the specified string pref from the master preferences and returns |
| 207 // its value. Should be used for master prefs that shouldn't be automatically | 203 // its value. Should be used for master prefs that shouldn't be automatically |
| 208 // copied over to profile preferences. | 204 // copied over to profile preferences. |
| 209 std::string ExtractPrefString(const std::string& name) const; | 205 std::string ExtractPrefString(const std::string& name) const; |
| 210 | 206 |
| 211 scoped_ptr<base::DictionaryValue> master_dictionary_; | 207 scoped_ptr<base::DictionaryValue> master_dictionary_; |
| 212 base::DictionaryValue* distribution_; | 208 base::DictionaryValue* distribution_; |
| 213 bool preferences_read_from_file_; | 209 bool preferences_read_from_file_; |
| 214 bool chrome_; | 210 bool chrome_; |
| 215 bool chrome_app_launcher_; | |
| 216 bool multi_install_; | 211 bool multi_install_; |
| 217 | 212 |
| 218 private: | 213 private: |
| 219 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); | 214 DISALLOW_COPY_AND_ASSIGN(MasterPreferences); |
| 220 }; | 215 }; |
| 221 | 216 |
| 222 } // namespace installer | 217 } // namespace installer |
| 223 | 218 |
| 224 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ | 219 #endif // CHROME_INSTALLER_UTIL_MASTER_PREFERENCES_H_ |
| OLD | NEW |