Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / installer / util / google_chrome_distribution.h
blobc61c90f2c498aab22a51df1f5ad0a2358edc483f
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.
4 //
5 // This file extends generic BrowserDistribution class to declare Google Chrome
6 // specific implementation.
8 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_
9 #define CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_
11 #include "base/gtest_prod_util.h"
12 #include "base/strings/string16.h"
13 #include "chrome/installer/util/browser_distribution.h"
15 namespace base {
16 class FilePath;
19 class AppRegistrationData;
21 class GoogleChromeDistribution : public BrowserDistribution {
22 public:
23 // Opens the Google Chrome uninstall survey window.
24 // version refers to the version of Chrome being uninstalled.
25 // local_data_path is the path of the file containing json metrics that
26 // will be parsed. If this file indicates that the user has opted in to
27 // providing anonymous usage data, then some additional statistics will
28 // be added to the survey url.
29 // distribution_data contains Google Update related data that will be
30 // concatenated to the survey url if the file in local_data_path indicates
31 // the user has opted in to providing anonymous usage data.
32 void DoPostUninstallOperations(
33 const Version& version,
34 const base::FilePath& local_data_path,
35 const base::string16& distribution_data) override;
37 base::string16 GetActiveSetupGuid() override;
39 base::string16 GetShortcutName(ShortcutType shortcut_type) override;
41 base::string16 GetIconFilename() override;
43 int GetIconIndex(ShortcutType shortcut_type) override;
45 base::string16 GetBaseAppName() override;
47 base::string16 GetBaseAppId() override;
49 base::string16 GetBrowserProgIdPrefix() override;
51 base::string16 GetBrowserProgIdDesc() override;
53 base::string16 GetInstallSubDir() override;
55 base::string16 GetPublisherName() override;
57 base::string16 GetAppDescription() override;
59 std::string GetSafeBrowsingName() override;
61 // This method reads data from the Google Update ClientState key for
62 // potential use in the uninstall survey. It must be called before the
63 // key returned by GetVersionKey() is deleted.
64 base::string16 GetDistributionData(HKEY root_key) override;
66 base::string16 GetUninstallRegPath() override;
68 base::string16 GetCommandExecuteImplClsid() override;
70 void UpdateInstallStatus(
71 bool system_install,
72 installer::ArchiveType archive_type,
73 installer::InstallStatus install_status) override;
75 bool ShouldSetExperimentLabels() override;
77 bool HasUserExperiments() override;
79 protected:
80 // Disallow construction from others.
81 GoogleChromeDistribution();
83 explicit GoogleChromeDistribution(
84 scoped_ptr<AppRegistrationData> app_reg_data);
86 private:
87 friend class BrowserDistribution;
90 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_