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/setup_main.h" | 5 #include "chrome/installer/setup/setup_main.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <msi.h> | 8 #include <msi.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 // Creates the sentinel indicating that the EULA was required and has been | 853 // Creates the sentinel indicating that the EULA was required and has been |
854 // accepted. | 854 // accepted. |
855 bool CreateEULASentinel(BrowserDistribution* dist) { | 855 bool CreateEULASentinel(BrowserDistribution* dist) { |
856 base::FilePath eula_sentinel; | 856 base::FilePath eula_sentinel; |
857 if (!InstallUtil::GetSentinelFilePath(installer::kEULASentinelFile, dist, | 857 if (!InstallUtil::GetSentinelFilePath(installer::kEULASentinelFile, dist, |
858 &eula_sentinel)) { | 858 &eula_sentinel)) { |
859 return false; | 859 return false; |
860 } | 860 } |
861 | 861 |
862 return (base::CreateDirectory(eula_sentinel.DirName()) && | 862 return (base::CreateDirectory(eula_sentinel.DirName()) && |
863 file_util::WriteFile(eula_sentinel, "", 0) != -1); | 863 base::WriteFile(eula_sentinel, "", 0) != -1); |
864 } | 864 } |
865 | 865 |
866 void ActivateMetroChrome() { | 866 void ActivateMetroChrome() { |
867 // Check to see if we're per-user or not. Need to do this since we may | 867 // Check to see if we're per-user or not. Need to do this since we may |
868 // not have been invoked with --system-level even for a machine install. | 868 // not have been invoked with --system-level even for a machine install. |
869 wchar_t exe_path[MAX_PATH * 2] = {}; | 869 wchar_t exe_path[MAX_PATH * 2] = {}; |
870 GetModuleFileName(NULL, exe_path, arraysize(exe_path)); | 870 GetModuleFileName(NULL, exe_path, arraysize(exe_path)); |
871 bool is_per_user_install = InstallUtil::IsPerUserInstall(exe_path); | 871 bool is_per_user_install = InstallUtil::IsPerUserInstall(exe_path); |
872 | 872 |
873 base::string16 app_model_id = ShellUtil::GetBrowserModelId( | 873 base::string16 app_model_id = ShellUtil::GetBrowserModelId( |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1811 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1812 // to pass through, since this is only returned on uninstall which is | 1812 // to pass through, since this is only returned on uninstall which is |
1813 // never invoked directly by Google Update. | 1813 // never invoked directly by Google Update. |
1814 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1814 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1815 } | 1815 } |
1816 | 1816 |
1817 VLOG(1) << "Installation complete, returning: " << return_code; | 1817 VLOG(1) << "Installation complete, returning: " << return_code; |
1818 | 1818 |
1819 return return_code; | 1819 return return_code; |
1820 } | 1820 } |
OLD | NEW |