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 <shlobj.h> | 7 #include <shlobj.h> |
8 #include <time.h> | 8 #include <time.h> |
9 #include <winuser.h> | 9 #include <winuser.h> |
10 | 10 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 const Product& product, | 385 const Product& product, |
386 bool make_chrome_default) { | 386 bool make_chrome_default) { |
387 DCHECK(product.is_chrome()); | 387 DCHECK(product.is_chrome()); |
388 | 388 |
389 // Try to add Chrome to Media Player shim inclusion list. We don't do any | 389 // Try to add Chrome to Media Player shim inclusion list. We don't do any |
390 // error checking here because this operation will fail if user doesn't | 390 // error checking here because this operation will fail if user doesn't |
391 // have admin rights and we want to ignore the error. | 391 // have admin rights and we want to ignore the error. |
392 AddChromeToMediaPlayerList(); | 392 AddChromeToMediaPlayerList(); |
393 | 393 |
394 // Make Chrome the default browser if desired when possible. Otherwise, only | 394 // Make Chrome the default browser if desired when possible. Otherwise, only |
395 // register it for shell integration. | 395 // register it with Windows. |
396 BrowserDistribution* dist = product.distribution(); | 396 BrowserDistribution* dist = product.distribution(); |
397 const string16 chrome_exe( | 397 const string16 chrome_exe( |
398 installer_state.target_path().Append(installer::kChromeExe).value()); | 398 installer_state.target_path().Append(installer::kChromeExe).value()); |
399 VLOG(1) << "Registering Chrome as browser: " << chrome_exe; | 399 VLOG(1) << "Registering Chrome as browser: " << chrome_exe; |
400 if (make_chrome_default) { | 400 if (make_chrome_default) { |
401 if (ShellUtil::CanMakeChromeDefaultUnattended()) { | 401 if (ShellUtil::CanMakeChromeDefaultUnattended()) { |
402 int level = ShellUtil::CURRENT_USER; | 402 int level = ShellUtil::CURRENT_USER; |
403 if (installer_state.system_install()) | 403 if (installer_state.system_install()) |
404 level = level | ShellUtil::SYSTEM_LEVEL; | 404 level = level | ShellUtil::SYSTEM_LEVEL; |
405 ShellUtil::MakeChromeDefault(dist, level, chrome_exe, true); | 405 ShellUtil::MakeChromeDefault(dist, level, chrome_exe, true); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 installer_state.RemoveOldVersionDirectories( | 546 installer_state.RemoveOldVersionDirectories( |
547 new_version, | 547 new_version, |
548 existing_version.get(), | 548 existing_version.get(), |
549 install_temp_path); | 549 install_temp_path); |
550 } | 550 } |
551 | 551 |
552 return result; | 552 return result; |
553 } | 553 } |
554 | 554 |
555 } // namespace installer | 555 } // namespace installer |
OLD | NEW |