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_browser_operations.h" | 5 #include "chrome/installer/util/chrome_browser_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/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // - icon_index: |dist|'s icon index | 110 // - icon_index: |dist|'s icon index |
111 // - app_id: the browser model id for the current install. | 111 // - app_id: the browser model id for the current install. |
112 // - description: |dist|'s description. | 112 // - description: |dist|'s description. |
113 void ChromeBrowserOperations::AddDefaultShortcutProperties( | 113 void ChromeBrowserOperations::AddDefaultShortcutProperties( |
114 BrowserDistribution* dist, | 114 BrowserDistribution* dist, |
115 const base::FilePath& target_exe, | 115 const base::FilePath& target_exe, |
116 ShellUtil::ShortcutProperties* properties) const { | 116 ShellUtil::ShortcutProperties* properties) const { |
117 if (!properties->has_target()) | 117 if (!properties->has_target()) |
118 properties->set_target(target_exe); | 118 properties->set_target(target_exe); |
119 | 119 |
120 if (!properties->has_icon()) { | 120 if (!properties->has_icon()) |
121 properties->set_icon( | 121 properties->set_icon(target_exe, dist->GetIconIndex()); |
122 target_exe, dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME)); | |
123 } | |
124 | 122 |
125 if (!properties->has_app_id()) { | 123 if (!properties->has_app_id()) { |
126 properties->set_app_id(ShellUtil::GetBrowserModelId( | 124 properties->set_app_id(ShellUtil::GetBrowserModelId( |
127 dist, InstallUtil::IsPerUserInstall(target_exe))); | 125 dist, InstallUtil::IsPerUserInstall(target_exe))); |
128 } | 126 } |
129 | 127 |
130 if (!properties->has_description()) | 128 if (!properties->has_description()) |
131 properties->set_description(dist->GetAppDescription()); | 129 properties->set_description(dist->GetAppDescription()); |
132 } | 130 } |
133 | 131 |
134 void ChromeBrowserOperations::LaunchUserExperiment( | 132 void ChromeBrowserOperations::LaunchUserExperiment( |
135 const base::FilePath& setup_path, | 133 const base::FilePath& setup_path, |
136 const std::set<base::string16>& options, | 134 const std::set<base::string16>& options, |
137 InstallStatus status, | 135 InstallStatus status, |
138 bool system_level) const { | 136 bool system_level) const { |
139 base::CommandLine base_command(setup_path); | 137 base::CommandLine base_command(setup_path); |
140 AppendProductFlags(options, &base_command); | 138 AppendProductFlags(options, &base_command); |
141 installer::LaunchBrowserUserExperiment(base_command, status, system_level); | 139 installer::LaunchBrowserUserExperiment(base_command, status, system_level); |
142 } | 140 } |
143 | 141 |
144 } // namespace installer | 142 } // namespace installer |
OLD | NEW |