| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 void AddChromeToMediaPlayerList() { | 132 void AddChromeToMediaPlayerList() { |
| 133 base::string16 reg_path(installer::kMediaPlayerRegPath); | 133 base::string16 reg_path(installer::kMediaPlayerRegPath); |
| 134 // registry paths can also be appended like file system path | 134 // registry paths can also be appended like file system path |
| 135 reg_path.push_back(base::FilePath::kSeparators[0]); | 135 reg_path.push_back(base::FilePath::kSeparators[0]); |
| 136 reg_path.append(installer::kChromeExe); | 136 reg_path.append(installer::kChromeExe); |
| 137 VLOG(1) << "Adding Chrome to Media player list at " << reg_path; | 137 VLOG(1) << "Adding Chrome to Media player list at " << reg_path; |
| 138 scoped_ptr<WorkItem> work_item(WorkItem::CreateCreateRegKeyWorkItem( | 138 scoped_ptr<WorkItem> work_item(WorkItem::CreateCreateRegKeyWorkItem( |
| 139 HKEY_LOCAL_MACHINE, reg_path)); | 139 HKEY_LOCAL_MACHINE, reg_path, WorkItem::WOW64_DEFAULT)); |
| 140 | 140 |
| 141 // if the operation fails we log the error but still continue | 141 // if the operation fails we log the error but still continue |
| 142 if (!work_item.get()->Do()) | 142 if (!work_item.get()->Do()) |
| 143 LOG(ERROR) << "Could not add Chrome to media player inclusion list."; | 143 LOG(ERROR) << "Could not add Chrome to media player inclusion list."; |
| 144 } | 144 } |
| 145 | 145 |
| 146 // Copy master_preferences file provided to installer, in the same folder | 146 // Copy master_preferences file provided to installer, in the same folder |
| 147 // as chrome.exe so Chrome first run can find it. This function will be called | 147 // as chrome.exe so Chrome first run can find it. This function will be called |
| 148 // only on the first install of Chrome. | 148 // only on the first install of Chrome. |
| 149 void CopyPreferenceFileForFirstRun(const InstallerState& installer_state, | 149 void CopyPreferenceFileForFirstRun(const InstallerState& installer_state, |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 if (app_host_path.empty()) | 696 if (app_host_path.empty()) |
| 697 return false; | 697 return false; |
| 698 | 698 |
| 699 CommandLine cmd(app_host_path); | 699 CommandLine cmd(app_host_path); |
| 700 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); | 700 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); |
| 701 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); | 701 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); |
| 702 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 702 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
| 703 } | 703 } |
| 704 | 704 |
| 705 } // namespace installer | 705 } // namespace installer |
| OLD | NEW |