OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // See the corresponding header file for description of the functions in this | 5 // See the corresponding header file for description of the functions in this |
6 // file. | 6 // file. |
7 | 7 |
8 #include "install_util.h" | 8 #include "install_util.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <shellapi.h> | 11 #include <shellapi.h> |
12 #include <shlobj.h> | 12 #include <shlobj.h> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/registry.h" | 15 #include "base/registry.h" |
| 16 #include "base/scoped_ptr.h" |
16 #include "base/string_util.h" | 17 #include "base/string_util.h" |
17 #include "base/win_util.h" | 18 #include "base/win_util.h" |
18 | 19 |
19 #include "chrome/installer/util/browser_distribution.h" | 20 #include "chrome/installer/util/browser_distribution.h" |
20 #include "chrome/installer/util/google_update_constants.h" | 21 #include "chrome/installer/util/google_update_constants.h" |
21 #include "chrome/installer/util/l10n_string_util.h" | 22 #include "chrome/installer/util/l10n_string_util.h" |
22 #include "chrome/installer/util/work_item_list.h" | 23 #include "chrome/installer/util/work_item_list.h" |
23 | 24 |
24 bool InstallUtil::ExecuteExeAsAdmin(const std::wstring& exe, | 25 bool InstallUtil::ExecuteExeAsAdmin(const std::wstring& exe, |
25 const std::wstring& params, | 26 const std::wstring& params, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 wchar_t program_files_path[MAX_PATH] = {0}; | 119 wchar_t program_files_path[MAX_PATH] = {0}; |
119 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, | 120 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, |
120 SHGFP_TYPE_CURRENT, program_files_path))) { | 121 SHGFP_TYPE_CURRENT, program_files_path))) { |
121 return !StartsWith(exe_path, program_files_path, false); | 122 return !StartsWith(exe_path, program_files_path, false); |
122 } else { | 123 } else { |
123 NOTREACHED(); | 124 NOTREACHED(); |
124 } | 125 } |
125 return true; | 126 return true; |
126 } | 127 } |
OLD | NEW |