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 #include "chrome/installer/util/master_preferences.h" | 5 #include "chrome/installer/util/master_preferences.h" |
6 | 6 |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_value_serializer.h" | 9 #include "base/json/json_value_serializer.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 DCHECK(master_dictionary_.get()); | 129 DCHECK(master_dictionary_.get()); |
130 | 130 |
131 // A simple map from command line switches to equivalent switches in the | 131 // A simple map from command line switches to equivalent switches in the |
132 // distribution dictionary. Currently all switches added will be set to | 132 // distribution dictionary. Currently all switches added will be set to |
133 // 'true'. | 133 // 'true'. |
134 static const struct CmdLineSwitchToDistributionSwitch { | 134 static const struct CmdLineSwitchToDistributionSwitch { |
135 const char* cmd_line_switch; | 135 const char* cmd_line_switch; |
136 const char* distribution_switch; | 136 const char* distribution_switch; |
137 } translate_switches[] = { | 137 } translate_switches[] = { |
| 138 { installer::switches::kAutoLaunchChrome, |
| 139 installer::master_preferences::kAutoLaunchChrome }, |
138 { installer::switches::kCeee, | 140 { installer::switches::kCeee, |
139 installer::master_preferences::kCeee }, | 141 installer::master_preferences::kCeee }, |
140 { installer::switches::kChrome, | 142 { installer::switches::kChrome, |
141 installer::master_preferences::kChrome }, | 143 installer::master_preferences::kChrome }, |
142 { installer::switches::kChromeFrame, | 144 { installer::switches::kChromeFrame, |
143 installer::master_preferences::kChromeFrame }, | 145 installer::master_preferences::kChromeFrame }, |
144 { installer::switches::kChromeFrameReadyMode, | 146 { installer::switches::kChromeFrameReadyMode, |
145 installer::master_preferences::kChromeFrameReadyMode }, | 147 installer::master_preferences::kChromeFrameReadyMode }, |
146 { installer::switches::kCreateAllShortcuts, | 148 { installer::switches::kCreateAllShortcuts, |
147 installer::master_preferences::kCreateAllShortcuts }, | 149 installer::master_preferences::kCreateAllShortcuts }, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const { | 272 bool MasterPreferences::GetExtensionsBlock(DictionaryValue** extensions) const { |
271 return master_dictionary_->GetDictionary( | 273 return master_dictionary_->GetDictionary( |
272 master_preferences::kExtensionsBlock, extensions); | 274 master_preferences::kExtensionsBlock, extensions); |
273 } | 275 } |
274 | 276 |
275 // static | 277 // static |
276 const MasterPreferences& MasterPreferences::ForCurrentProcess() { | 278 const MasterPreferences& MasterPreferences::ForCurrentProcess() { |
277 return g_master_preferences.Get(); | 279 return g_master_preferences.Get(); |
278 } | 280 } |
279 } // installer_util | 281 } // installer_util |
OLD | NEW |