Chromium Code Reviews| Index: chrome/app_installer/win/app_installer_util.h |
| diff --git a/chrome/app_installer/win/app_installer_util.h b/chrome/app_installer/win/app_installer_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d48e9da210281467e8543b8d9154760a5d60c5f0 |
| --- /dev/null |
| +++ b/chrome/app_installer/win/app_installer_util.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_APP_INSTALLER_WIN_APP_INSTALLER_UTIL_H_ |
| +#define CHROME_APP_INSTALLER_WIN_APP_INSTALLER_UTIL_H_ |
| + |
| +#include "base/files/file_path.h" |
| + |
| +namespace app_installer { |
| + |
| +extern const char kInstallChromeApp[]; |
| + |
| +enum ExitCode { |
| + SUCCESS = 0, |
| + COULD_NOT_GET_FILE_PATH, |
| + COULD_NOT_READ_TAG, |
| + COULD_NOT_PARSE_TAG, |
| + INVALID_APP_ID, |
| + EULA_CANCELLED, |
| + COULD_NOT_FIND_CHROME, |
| + COULD_NOT_GET_TMP_FILE_PATH, |
| + FAILED_TO_DOWNLOAD_CHROME_SETUP, |
| + FAILED_TO_LAUNCH_CHROME_SETUP, |
| +}; |
| + |
| +// Gets the tag attached to a file by dl.google.com. This uses the same format |
| +// as Omaha. Returns the empty string on failure. |
| +std::string GetTag(const base::FilePath& file_name_path); |
|
grt (UTC plus 2)
2014/11/07 03:13:36
#include <string>
jackhou1
2014/11/07 05:37:52
Done.
|
| + |
| +// Parses |tag| as key-value pairs and overwrites |parsed_pairs| with |
| +// the result. |tag| should be a '&'-delimited list of '='-separated |
| +// key-value pairs, e.g. "key1=value1&key2=value2". |
| +// Returns true if the data could be parsed. |
| +bool ParseTag(const std::string& tag, |
| + std::map<std::string, std::string>* parsed_pairs); |
|
grt (UTC plus 2)
2014/11/07 03:13:36
#include <map>
jackhou1
2014/11/07 05:37:52
Done.
|
| + |
| +bool IsValidAppId(const std::string& app_id); |
| + |
| +base::FilePath GetChromeExePath(bool is_canary); |
| + |
| +// Shows UI to download and install Chrome. Returns a failure code, or SUCCESS |
| +// if the installation completed successfully. |
| +ExitCode GetChrome(bool is_canary); |
| + |
| +} // namespace app_installer |
| + |
| +#endif // CHROME_APP_INSTALLER_WIN_APP_INSTALLER_UTIL_H_ |