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