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/setup/install.h" | 5 #include "chrome/installer/setup/install.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 return installer::INSTALL_SHORTCUT_CREATE_ALL; | 282 return installer::INSTALL_SHORTCUT_CREATE_ALL; |
283 | 283 |
284 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING; | 284 return installer::INSTALL_SHORTCUT_REPLACE_EXISTING; |
285 } | 285 } |
286 | 286 |
287 } // end namespace | 287 } // end namespace |
288 | 288 |
289 namespace installer { | 289 namespace installer { |
290 | 290 |
291 void EscapeXmlAttributeValueInSingleQuotes(string16* att_value) { | 291 void EscapeXmlAttributeValueInSingleQuotes(string16* att_value) { |
292 ReplaceChars(*att_value, L"&", L"&", att_value); | 292 base::ReplaceChars(*att_value, L"&", L"&", att_value); |
293 ReplaceChars(*att_value, L"'", L"'", att_value); | 293 base::ReplaceChars(*att_value, L"'", L"'", att_value); |
294 ReplaceChars(*att_value, L"<", L"<", att_value); | 294 base::ReplaceChars(*att_value, L"<", L"<", att_value); |
295 } | 295 } |
296 | 296 |
297 bool CreateVisualElementsManifest(const base::FilePath& src_path, | 297 bool CreateVisualElementsManifest(const base::FilePath& src_path, |
298 const Version& version) { | 298 const Version& version) { |
299 // Construct the relative path to the versioned VisualElements directory. | 299 // Construct the relative path to the versioned VisualElements directory. |
300 string16 elements_dir(ASCIIToUTF16(version.GetString())); | 300 string16 elements_dir(ASCIIToUTF16(version.GetString())); |
301 elements_dir.push_back(base::FilePath::kSeparators[0]); | 301 elements_dir.push_back(base::FilePath::kSeparators[0]); |
302 elements_dir.append(installer::kVisualElements); | 302 elements_dir.append(installer::kVisualElements); |
303 | 303 |
304 // Some distributions of Chromium may not include visual elements. Only | 304 // Some distributions of Chromium may not include visual elements. Only |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 if (app_host_path.empty()) | 694 if (app_host_path.empty()) |
695 return false; | 695 return false; |
696 | 696 |
697 CommandLine cmd(app_host_path); | 697 CommandLine cmd(app_host_path); |
698 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); | 698 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); |
699 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); | 699 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); |
700 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 700 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
701 } | 701 } |
702 | 702 |
703 } // namespace installer | 703 } // namespace installer |
OLD | NEW |