[Android] Added UMA for search by image context menu.
[chromium-blink-merge.git] / chrome / installer / util / chrome_binaries_operations.cc
blobb9e465887772422e42add98a58814996a37fff68
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<string16>* options) const {
20 DCHECK(options);
21 options->insert(kOptionMultiInstall);
24 void ChromeBinariesOperations::ReadOptions(const CommandLine& uninstall_command,
25 std::set<string16>* options) const {
26 DCHECK(options);
27 options->insert(kOptionMultiInstall);
30 void ChromeBinariesOperations::AddKeyFiles(
31 const std::set<string16>& options,
32 std::vector<base::FilePath>* key_files) const {
33 DCHECK(key_files);
34 key_files->push_back(base::FilePath(installer::kChromeDll));
37 void ChromeBinariesOperations::AddComDllList(
38 const std::set<string16>& options,
39 std::vector<base::FilePath>* com_dll_list) const {
42 void ChromeBinariesOperations::AppendProductFlags(
43 const std::set<string16>& options,
44 CommandLine* cmd_line) const {
45 DCHECK(cmd_line);
47 DCHECK(options.find(kOptionMultiInstall) != options.end());
49 // Add --multi-install if it isn't already there.
50 if (!cmd_line->HasSwitch(switches::kMultiInstall))
51 cmd_line->AppendSwitch(switches::kMultiInstall);
54 void ChromeBinariesOperations::AppendRenameFlags(
55 const std::set<string16>& options,
56 CommandLine* cmd_line) const {
57 DCHECK(cmd_line);
59 DCHECK(options.find(kOptionMultiInstall) != options.end());
61 // Add --multi-install if it isn't already there.
62 if (!cmd_line->HasSwitch(switches::kMultiInstall))
63 cmd_line->AppendSwitch(switches::kMultiInstall);
66 bool ChromeBinariesOperations::SetChannelFlags(
67 const std::set<string16>& options,
68 bool set,
69 ChannelInfo* channel_info) const {
70 return false;
73 bool ChromeBinariesOperations::ShouldCreateUninstallEntry(
74 const std::set<string16>& options) const {
75 return false;
78 void ChromeBinariesOperations::AddDefaultShortcutProperties(
79 BrowserDistribution* dist,
80 const base::FilePath& target_exe,
81 ShellUtil::ShortcutProperties* properties) const {
82 NOTREACHED() << "Chrome Binaries do not create shortcuts.";
85 void ChromeBinariesOperations::LaunchUserExperiment(
86 const base::FilePath& setup_path,
87 const std::set<string16>& options,
88 InstallStatus status,
89 bool system_level) const {
90 // Not meaningful to have binaries run experiments.
91 NOTREACHED();
94 } // namespace installer