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

Side by Side Diff: chrome/installer/util/install_util.h

Issue 1986823002: Reset user data directory and disk cache directory after downgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cr Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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 // This file declares utility functions for the installer. The original reason 5 // This file declares utility functions for the installer. The original reason
6 // for putting these functions in installer\util library is so that we can 6 // for putting these functions in installer\util library is so that we can
7 // separate out the critical logic and write unit tests for it. 7 // separate out the critical logic and write unit tests for it.
8 8
9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_
10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 static int GetInstallReturnCode(installer::InstallStatus install_status); 176 static int GetInstallReturnCode(installer::InstallStatus install_status);
177 177
178 // Composes |program| and |arguments| into |command_line|. 178 // Composes |program| and |arguments| into |command_line|.
179 static void ComposeCommandLine(const base::string16& program, 179 static void ComposeCommandLine(const base::string16& program,
180 const base::string16& arguments, 180 const base::string16& arguments,
181 base::CommandLine* command_line); 181 base::CommandLine* command_line);
182 182
183 // Returns a string in the form YYYYMMDD of the current date. 183 // Returns a string in the form YYYYMMDD of the current date.
184 static base::string16 GetCurrentDate(); 184 static base::string16 GetCurrentDate();
185 185
186 // Return downgrade version if the value exists or empty version.
grt (UTC plus 2) 2016/05/20 15:25:05 "Returns..." as per https://google.github.io/style
zmin 2016/05/20 16:33:06 Done.
187 static base::Version GetDowngradeVersion(HKEY root,
188 const BrowserDistribution* dist);
189
190 // Add or remove downgrade version registry value. This function should only
grt (UTC plus 2) 2016/05/20 15:25:05 "Adds or removes..."
zmin 2016/05/20 16:33:06 Done.
191 // be used for Chrome install.
192 static void AddUpdateDowngradeVersionItem(
193 HKEY root,
194 const base::Version& current_version,
195 const base::Version& new_version,
196 const BrowserDistribution* dist,
197 WorkItemList* list);
198
186 // A predicate that compares the program portion of a command line with a 199 // A predicate that compares the program portion of a command line with a
187 // given file path. First, the file paths are compared directly. If they do 200 // given file path. First, the file paths are compared directly. If they do
188 // not match, the filesystem is consulted to determine if the paths reference 201 // not match, the filesystem is consulted to determine if the paths reference
189 // the same file. 202 // the same file.
190 class ProgramCompare : public RegistryValuePredicate { 203 class ProgramCompare : public RegistryValuePredicate {
191 public: 204 public:
192 enum class ComparisonType { 205 enum class ComparisonType {
193 // Evaluation compares existing files. 206 // Evaluation compares existing files.
194 FILE, 207 FILE,
195 // Evaluation compares existing files or directories. 208 // Evaluation compares existing files or directories.
(...skipping 26 matching lines...) Expand all
222 private: 235 private:
223 DISALLOW_COPY_AND_ASSIGN(ProgramCompare); 236 DISALLOW_COPY_AND_ASSIGN(ProgramCompare);
224 }; // class ProgramCompare 237 }; // class ProgramCompare
225 238
226 private: 239 private:
227 DISALLOW_COPY_AND_ASSIGN(InstallUtil); 240 DISALLOW_COPY_AND_ASSIGN(InstallUtil);
228 }; 241 };
229 242
230 243
231 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ 244 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698