OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/installer/util/chrome_binaries_operations.h" | |
6 | |
7 #include "base/command_line.h" | |
8 #include "base/files/file_path.h" | |
9 #include "base/logging.h" | |
10 #include "chrome/installer/util/channel_info.h" | |
11 #include "chrome/installer/util/helper.h" | |
12 #include "chrome/installer/util/master_preferences.h" | |
13 #include "chrome/installer/util/master_preferences_constants.h" | |
14 #include "chrome/installer/util/util_constants.h" | |
15 | |
16 namespace installer { | |
17 | |
18 void ChromeBinariesOperations::ReadOptions(const MasterPreferences& prefs, | |
19 std::set<base::string16>* options) | |
20 const { | |
21 DCHECK(options); | |
22 options->insert(kOptionMultiInstall); | |
23 } | |
24 | |
25 void ChromeBinariesOperations::ReadOptions( | |
26 const base::CommandLine& uninstall_command, | |
27 std::set<base::string16>* options) const { | |
28 DCHECK(options); | |
29 options->insert(kOptionMultiInstall); | |
30 } | |
31 | |
32 void ChromeBinariesOperations::AddKeyFiles( | |
33 const std::set<base::string16>& options, | |
34 std::vector<base::FilePath>* key_files) const { | |
35 DCHECK(key_files); | |
36 key_files->push_back(base::FilePath(installer::kChromeDll)); | |
37 } | |
38 | |
39 void ChromeBinariesOperations::AppendProductFlags( | |
40 const std::set<base::string16>& options, | |
41 base::CommandLine* cmd_line) const { | |
42 DCHECK(cmd_line); | |
43 | |
44 DCHECK(options.find(kOptionMultiInstall) != options.end()); | |
45 | |
46 // Add --multi-install if it isn't already there. | |
47 if (!cmd_line->HasSwitch(switches::kMultiInstall)) | |
48 cmd_line->AppendSwitch(switches::kMultiInstall); | |
49 } | |
50 | |
51 void ChromeBinariesOperations::AppendRenameFlags( | |
52 const std::set<base::string16>& options, | |
53 base::CommandLine* cmd_line) const { | |
54 DCHECK(cmd_line); | |
55 | |
56 DCHECK(options.find(kOptionMultiInstall) != options.end()); | |
57 | |
58 // Add --multi-install if it isn't already there. | |
59 if (!cmd_line->HasSwitch(switches::kMultiInstall)) | |
60 cmd_line->AppendSwitch(switches::kMultiInstall); | |
61 } | |
62 | |
63 bool ChromeBinariesOperations::SetChannelFlags( | |
64 const std::set<base::string16>& options, | |
65 bool set, | |
66 ChannelInfo* channel_info) const { | |
67 return false; | |
68 } | |
69 | |
70 bool ChromeBinariesOperations::ShouldCreateUninstallEntry( | |
71 const std::set<base::string16>& options) const { | |
72 return false; | |
73 } | |
74 | |
75 void ChromeBinariesOperations::AddDefaultShortcutProperties( | |
76 BrowserDistribution* dist, | |
77 const base::FilePath& target_exe, | |
78 ShellUtil::ShortcutProperties* properties) const { | |
79 NOTREACHED() << "Chrome Binaries do not create shortcuts."; | |
80 } | |
81 | |
82 void ChromeBinariesOperations::LaunchUserExperiment( | |
83 const base::FilePath& setup_path, | |
84 const std::set<base::string16>& options, | |
85 InstallStatus status, | |
86 bool system_level) const { | |
87 // Not meaningful to have binaries run experiments. | |
88 NOTREACHED(); | |
89 } | |
90 | |
91 } // namespace installer | |
OLD | NEW |