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 // 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"
19 class GoogleChromeDistribution
: public BrowserDistribution
{
21 // Opens the Google Chrome uninstall survey window.
22 // version refers to the version of Chrome being uninstalled.
23 // local_data_path is the path of the file containing json metrics that
24 // will be parsed. If this file indicates that the user has opted in to
25 // providing anonymous usage data, then some additional statistics will
26 // be added to the survey url.
27 // distribution_data contains Google Update related data that will be
28 // concatenated to the survey url if the file in local_data_path indicates
29 // the user has opted in to providing anonymous usage data.
30 virtual void DoPostUninstallOperations(
31 const Version
& version
,
32 const base::FilePath
& local_data_path
,
33 const base::string16
& distribution_data
) OVERRIDE
;
35 virtual base::string16
GetActiveSetupGuid() OVERRIDE
;
37 virtual base::string16
GetAppGuid() OVERRIDE
;
39 virtual base::string16
GetShortcutName(ShortcutType shortcut_type
) OVERRIDE
;
41 virtual base::string16
GetIconFilename() OVERRIDE
;
43 virtual int GetIconIndex(ShortcutType shortcut_type
) OVERRIDE
;
45 virtual base::string16
GetBaseAppName() OVERRIDE
;
47 virtual base::string16
GetBaseAppId() OVERRIDE
;
49 virtual base::string16
GetBrowserProgIdPrefix() OVERRIDE
;
51 virtual base::string16
GetBrowserProgIdDesc() OVERRIDE
;
53 virtual base::string16
GetInstallSubDir() OVERRIDE
;
55 virtual base::string16
GetPublisherName() OVERRIDE
;
57 virtual base::string16
GetAppDescription() OVERRIDE
;
59 virtual std::string
GetSafeBrowsingName() OVERRIDE
;
61 virtual base::string16
GetStateKey() OVERRIDE
;
63 virtual base::string16
GetStateMediumKey() OVERRIDE
;
65 virtual std::string
GetNetworkStatsServer() const OVERRIDE
;
67 virtual std::string
GetHttpPipeliningTestServer() const OVERRIDE
;
69 // This method reads data from the Google Update ClientState key for
70 // potential use in the uninstall survey. It must be called before the
71 // key returned by GetVersionKey() is deleted.
72 virtual base::string16
GetDistributionData(HKEY root_key
) OVERRIDE
;
74 virtual base::string16
GetUninstallLinkName() OVERRIDE
;
76 virtual base::string16
GetUninstallRegPath() OVERRIDE
;
78 virtual base::string16
GetVersionKey() OVERRIDE
;
80 virtual bool GetCommandExecuteImplClsid(
81 base::string16
* handler_class_uuid
) OVERRIDE
;
83 virtual bool AppHostIsSupported() OVERRIDE
;
85 virtual void UpdateInstallStatus(
87 installer::ArchiveType archive_type
,
88 installer::InstallStatus install_status
) OVERRIDE
;
90 virtual bool ShouldSetExperimentLabels() OVERRIDE
;
92 virtual bool HasUserExperiments() OVERRIDE
;
94 const base::string16
& product_guid() { return product_guid_
; }
97 void set_product_guid(const base::string16
& guid
) { product_guid_
= guid
; }
99 // Disallow construction from others.
100 GoogleChromeDistribution();
103 friend class BrowserDistribution
;
105 // The product ID for Google Update.
106 base::string16 product_guid_
;
109 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_