Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4737)

Unified Diff: chrome/installer/util/install_util.h

Issue 1800303006: Fix the path of shortcuts with an icon in the current install dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix buildbot error Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/install_util.h
diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h
index 672f0ff8d854c8076c040e948848155d544be528..79b8e2a2304f8755ce5a038b18da275ec1ddd017 100644
--- a/chrome/installer/util/install_util.h
+++ b/chrome/installer/util/install_util.h
@@ -189,19 +189,35 @@ class InstallUtil {
// the same file.
gab 2016/03/21 19:28:13 This class' functionality is no longer specific to
class ProgramCompare : public RegistryValuePredicate {
public:
+ enum class ComparisonType {
+ // Evaluation compares existing files.
+ FILE,
+ // Evaluation compares existing files or directories.
+ FILE_OR_DIRECTORY,
+ };
+
+ // Constructs a ProgramCompare with FILE as ComparisonType.
explicit ProgramCompare(const base::FilePath& path_to_match);
+
+ // Constructs a ProgramCompare with |comparison_type| as ComparisonType.
+ ProgramCompare(const base::FilePath& path_to_match,
+ ComparisonType comparison_type);
+
~ProgramCompare() override;
bool Evaluate(const base::string16& value) const override;
bool EvaluatePath(const base::FilePath& path) const;
protected:
- static bool OpenForInfo(const base::FilePath& path, base::File* file);
+ static bool OpenForInfo(const base::FilePath& path,
+ base::File* file,
+ ComparisonType comparison_type);
static bool GetInfo(const base::File& file,
BY_HANDLE_FILE_INFORMATION* info);
base::FilePath path_to_match_;
base::File file_;
BY_HANDLE_FILE_INFORMATION file_info_;
+ ComparisonType comparison_type_;
private:
DISALLOW_COPY_AND_ASSIGN(ProgramCompare);

Powered by Google App Engine
This is Rietveld 408576698