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 #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/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 DCHECK(master_dictionary_.get()); | 119 DCHECK(master_dictionary_.get()); |
120 | 120 |
121 // A simple map from command line switches to equivalent switches in the | 121 // A simple map from command line switches to equivalent switches in the |
122 // distribution dictionary. Currently all switches added will be set to | 122 // distribution dictionary. Currently all switches added will be set to |
123 // 'true'. | 123 // 'true'. |
124 static const struct CmdLineSwitchToDistributionSwitch { | 124 static const struct CmdLineSwitchToDistributionSwitch { |
125 const char* cmd_line_switch; | 125 const char* cmd_line_switch; |
126 const char* distribution_switch; | 126 const char* distribution_switch; |
127 } translate_switches[] = { | 127 } translate_switches[] = { |
128 { installer::switches::kAutoLaunchChrome, | |
129 installer::master_preferences::kAutoLaunchChrome }, | |
130 { installer::switches::kChrome, | 128 { installer::switches::kChrome, |
131 installer::master_preferences::kChrome }, | 129 installer::master_preferences::kChrome }, |
132 { installer::switches::kDisableLogging, | 130 { installer::switches::kDisableLogging, |
133 installer::master_preferences::kDisableLogging }, | 131 installer::master_preferences::kDisableLogging }, |
134 { installer::switches::kMsi, | 132 { installer::switches::kMsi, |
135 installer::master_preferences::kMsi }, | 133 installer::master_preferences::kMsi }, |
136 { installer::switches::kMultiInstall, | 134 { installer::switches::kMultiInstall, |
137 installer::master_preferences::kMultiInstall }, | 135 installer::master_preferences::kMultiInstall }, |
138 { installer::switches::kDoNotRegisterForUpdateLaunch, | 136 { installer::switches::kDoNotRegisterForUpdateLaunch, |
139 installer::master_preferences::kDoNotRegisterForUpdateLaunch }, | 137 installer::master_preferences::kDoNotRegisterForUpdateLaunch }, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 } | 318 } |
321 return result; | 319 return result; |
322 } | 320 } |
323 | 321 |
324 // static | 322 // static |
325 const MasterPreferences& MasterPreferences::ForCurrentProcess() { | 323 const MasterPreferences& MasterPreferences::ForCurrentProcess() { |
326 return g_master_preferences.Get(); | 324 return g_master_preferences.Get(); |
327 } | 325 } |
328 | 326 |
329 } // namespace installer | 327 } // namespace installer |
OLD | NEW |