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 // 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 "chrome/installer/util/install_util.h" | 8 #include "chrome/installer/util/install_util.h" |
9 | 9 |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
11 #include <shlobj.h> | 11 #include <shlobj.h> |
12 #include <shlwapi.h> | 12 #include <shlwapi.h> |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 | 15 |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/environment.h" | 17 #include "base/environment.h" |
18 #include "base/files/file_util.h" | 18 #include "base/files/file_util.h" |
19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/macros.h" |
20 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
21 #include "base/numerics/safe_conversions.h" | 22 #include "base/numerics/safe_conversions.h" |
22 #include "base/path_service.h" | 23 #include "base/path_service.h" |
23 #include "base/process/launch.h" | 24 #include "base/process/launch.h" |
24 #include "base/strings/string_util.h" | 25 #include "base/strings/string_util.h" |
25 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
26 #include "base/sys_info.h" | 27 #include "base/sys_info.h" |
27 #include "base/values.h" | 28 #include "base/values.h" |
28 #include "base/version.h" | 29 #include "base/version.h" |
29 #include "base/win/metro.h" | 30 #include "base/win/metro.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 // Open the program and see if it references the expected file. | 683 // Open the program and see if it references the expected file. |
683 base::File file; | 684 base::File file; |
684 BY_HANDLE_FILE_INFORMATION info = {}; | 685 BY_HANDLE_FILE_INFORMATION info = {}; |
685 | 686 |
686 return (OpenForInfo(path, &file) && | 687 return (OpenForInfo(path, &file) && |
687 GetInfo(file, &info) && | 688 GetInfo(file, &info) && |
688 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 689 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
689 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 690 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
690 info.nFileIndexLow == file_info_.nFileIndexLow); | 691 info.nFileIndexLow == file_info_.nFileIndexLow); |
691 } | 692 } |
OLD | NEW |