Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / installer / util / chrome_binaries_operations.cc
blobf8fc1ffb86b761711b9f44caddb69f5a2e88e018
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.
5 #include "chrome/installer/util/chrome_binaries_operations.h"
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"
16 namespace installer {
18 void ChromeBinariesOperations::ReadOptions(const MasterPreferences& prefs,
19 std::set<base::string16>* options)
20 const {
21 DCHECK(options);
22 options->insert(kOptionMultiInstall);
25 void ChromeBinariesOperations::ReadOptions(
26 const base::CommandLine& uninstall_command,
27 std::set<base::string16>* options) const {
28 DCHECK(options);
29 options->insert(kOptionMultiInstall);
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));
39 void ChromeBinariesOperations::AddComDllList(
40 const std::set<base::string16>& options,
41 std::vector<base::FilePath>* com_dll_list) const {
44 void ChromeBinariesOperations::AppendProductFlags(
45 const std::set<base::string16>& options,
46 base::CommandLine* cmd_line) const {
47 DCHECK(cmd_line);
49 DCHECK(options.find(kOptionMultiInstall) != options.end());
51 // Add --multi-install if it isn't already there.
52 if (!cmd_line->HasSwitch(switches::kMultiInstall))
53 cmd_line->AppendSwitch(switches::kMultiInstall);
56 void ChromeBinariesOperations::AppendRenameFlags(
57 const std::set<base::string16>& options,
58 base::CommandLine* cmd_line) const {
59 DCHECK(cmd_line);
61 DCHECK(options.find(kOptionMultiInstall) != options.end());
63 // Add --multi-install if it isn't already there.
64 if (!cmd_line->HasSwitch(switches::kMultiInstall))
65 cmd_line->AppendSwitch(switches::kMultiInstall);
68 bool ChromeBinariesOperations::SetChannelFlags(
69 const std::set<base::string16>& options,
70 bool set,
71 ChannelInfo* channel_info) const {
72 return false;
75 bool ChromeBinariesOperations::ShouldCreateUninstallEntry(
76 const std::set<base::string16>& options) const {
77 return false;
80 void ChromeBinariesOperations::AddDefaultShortcutProperties(
81 BrowserDistribution* dist,
82 const base::FilePath& target_exe,
83 ShellUtil::ShortcutProperties* properties) const {
84 NOTREACHED() << "Chrome Binaries do not create shortcuts.";
87 void ChromeBinariesOperations::LaunchUserExperiment(
88 const base::FilePath& setup_path,
89 const std::set<base::string16>& options,
90 InstallStatus status,
91 bool system_level) const {
92 // Not meaningful to have binaries run experiments.
93 NOTREACHED();
96 } // namespace installer