| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The file contains the implementation of the mini_installer re-versioner. | 5 // The file contains the implementation of the mini_installer re-versioner. |
| 6 // The main function (GenerateNextVersion) does the following in a temp dir: | 6 // The main function (GenerateNextVersion) does the following in a temp dir: |
| 7 // - Extracts and unpacks setup.exe and the Chrome-bin folder from | 7 // - Extracts and unpacks setup.exe and the Chrome-bin folder from |
| 8 // mini_installer.exe. | 8 // mini_installer.exe. |
| 9 // - Inspects setup.exe to determine the current version. | 9 // - Inspects setup.exe to determine the current version. |
| 10 // - Runs through all .dll and .exe files: | 10 // - Runs through all .dll and .exe files: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include <windows.h> | 26 #include <windows.h> |
| 27 | 27 |
| 28 #include <algorithm> | 28 #include <algorithm> |
| 29 #include <limits> | 29 #include <limits> |
| 30 #include <sstream> | 30 #include <sstream> |
| 31 #include <utility> | 31 #include <utility> |
| 32 #include <vector> | 32 #include <vector> |
| 33 | 33 |
| 34 #include "base/basictypes.h" | 34 #include "base/basictypes.h" |
| 35 #include "base/command_line.h" | 35 #include "base/command_line.h" |
| 36 #include "base/file_util.h" | |
| 37 #include "base/files/file.h" | 36 #include "base/files/file.h" |
| 38 #include "base/files/file_enumerator.h" | 37 #include "base/files/file_enumerator.h" |
| 39 #include "base/files/file_path.h" | 38 #include "base/files/file_path.h" |
| 39 #include "base/files/file_util.h" |
| 40 #include "base/logging.h" | 40 #include "base/logging.h" |
| 41 #include "base/path_service.h" | 41 #include "base/path_service.h" |
| 42 #include "base/process/launch.h" | 42 #include "base/process/launch.h" |
| 43 #include "base/process/process_handle.h" | 43 #include "base/process/process_handle.h" |
| 44 #include "base/strings/string_util.h" | 44 #include "base/strings/string_util.h" |
| 45 #include "base/strings/utf_string_conversions.h" | 45 #include "base/strings/utf_string_conversions.h" |
| 46 #include "base/version.h" | 46 #include "base/version.h" |
| 47 #include "base/win/pe_image.h" | 47 #include "base/win/pe_image.h" |
| 48 #include "base/win/scoped_handle.h" | 48 #include "base/win/scoped_handle.h" |
| 49 #include "chrome/installer/test/pe_image_resources.h" | 49 #include "chrome/installer/test/pe_image_resources.h" |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 return false; | 691 return false; |
| 692 } | 692 } |
| 693 ctx.current_version_str = ctx.current_version.ToString(); | 693 ctx.current_version_str = ctx.current_version.ToString(); |
| 694 ctx.new_version = ChromeVersion::FromString(version.GetString()); | 694 ctx.new_version = ChromeVersion::FromString(version.GetString()); |
| 695 ctx.new_version_str = ctx.new_version.ToString(); | 695 ctx.new_version_str = ctx.new_version.ToString(); |
| 696 | 696 |
| 697 return UpdateVersionIfMatch(target_file, &ctx); | 697 return UpdateVersionIfMatch(target_file, &ctx); |
| 698 } | 698 } |
| 699 | 699 |
| 700 } // namespace upgrade_test | 700 } // namespace upgrade_test |
| OLD | NEW |