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
3 // found in the LICENSE file.
5 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_UTIL_H_
6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_UTIL_H_
10 namespace google_update
{
12 // If user-level Google Update is absent, calls the system-level
13 // GoogleUpdateSetup.exe to install it, and waits until it finishes.
14 // Returns true if already installed, installed successfully, or
15 // if Google Update is not present at system-level.
16 // Returns false if the installation fails.
17 bool EnsureUserLevelGoogleUpdatePresent();
19 // Tell Google Update that an uninstall has taken place. This gives it a chance
20 // to uninstall itself straight away if no more products are installed on the
21 // system rather than waiting for the next time the scheduled task runs.
22 // Returns false if Google Update could not be executed, or times out.
23 bool UninstallGoogleUpdate(bool system_install
);
25 // Returns the value corresponding to |key| in untrusted data passed from
26 // Google Update. Returns an empty string if |key| is absent or if its value
27 // contains non-printable characters.
28 std::string
GetUntrustedDataValue(const std::string
& key
);
30 } // namespace google_update
32 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_UTIL_H_