Chromium Code Reviews| Index: chrome/installer/util/browser_distribution.h |
| diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h |
| index 025a70884f347d96d52b7ecc9900ec5007da9afd..54f3a76bf5e7d66016bfde2b200c0a9414441243 100644 |
| --- a/chrome/installer/util/browser_distribution.h |
| +++ b/chrome/installer/util/browser_distribution.h |
| @@ -8,6 +8,7 @@ |
| #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| #include <string> |
| +#include <vector> |
| #include "base/basictypes.h" |
| #include "base/files/file_path.h" |
| @@ -19,10 +20,6 @@ |
| #include <windows.h> // NOLINT |
| #endif |
| -namespace installer { |
| -class Product; |
| -} |
| - |
| class BrowserDistribution { |
| public: |
| enum Type { |
| @@ -33,28 +30,6 @@ class BrowserDistribution { |
| NUM_TYPES |
| }; |
| - // Flags to control what to show in the UserExperiment dialog. |
| - enum ToastUIflags { |
| - kUninstall = 1, // Uninstall radio button. |
| - kDontBugMeAsButton = 2, // Don't bug me is a button, not a radio button. |
| - kWhyLink = 4, // Has the 'why I am seeing this' link. |
| - kMakeDefault = 8 // Has the 'make it default' checkbox. |
| - }; |
| - |
| - // A struct for communicating what a UserExperiment contains. In these |
| - // experiments we show toasts to the user if they are inactive for a certain |
| - // amount of time. |
| - struct UserExperiment { |
| - string16 prefix; // The experiment code prefix for this experiment, |
| - // also known as the 'TV' part in 'TV80'. |
| - int flavor; // The flavor index for this experiment. |
| - int heading; // The heading resource ID to use for this experiment. |
| - int flags; // See ToastUIFlags above. |
| - int control_group; // Size of the control group (in percentages). Control |
| - // group is the group that qualifies for the |
| - // experiment but does not participate. |
| - }; |
| - |
| virtual ~BrowserDistribution() {} |
| static BrowserDistribution* GetDistribution(); |
| @@ -118,6 +93,16 @@ class BrowserDistribution { |
| virtual string16 GetUninstallRegPath(); |
| + // Returns the path(s) to the directory that holds the user data (primary, |
| + // and alterante if applicable). This is always inside a user's |
| + // local application data folder (e.g., "AppData\Local or "Local |
| + // Settings\Application Data" in %USERPROFILE%). Note that these are the |
| + // defaults and do not take into account that they can be overriden with a |
| + // command line parameter. |paths| may be empty on return, but is guaranteed |
| + // not to contain empty paths otherwise. If more than one path is returned, |
| + // they are guaranteed to be siblings. |
| + virtual void GetUserDataPaths(std::vector<base::FilePath>* paths); |
| + |
| virtual string16 GetVersionKey(); |
| virtual bool CanSetAsDefault(); |
| @@ -145,32 +130,12 @@ class BrowserDistribution { |
| installer::ArchiveType archive_type, |
| installer::InstallStatus install_status); |
| - // Gets the experiment details for a given language-brand combo. If |flavor| |
| - // is -1, then a flavor will be selected at random. |experiment| is the struct |
| - // you want to write the experiment information to. Returns false if no |
| - // experiment details could be gathered. |
| - virtual bool GetExperimentDetails(UserExperiment* experiment, int flavor); |
| - |
| - // After an install or upgrade the user might qualify to participate in an |
| - // experiment. This function determines if the user qualifies and if so it |
| - // sets the wheels in motion or in simple cases does the experiment itself. |
| - virtual void LaunchUserExperiment(const base::FilePath& setup_path, |
| - installer::InstallStatus status, |
| - const Version& version, |
| - const installer::Product& product, |
| - bool system_level); |
| - |
| - // The user has qualified for the inactive user toast experiment and this |
| - // function just performs it. |
| - virtual void InactiveUserToastExperiment(int flavor, |
| - const string16& experiment_group, |
| - const installer::Product& installation, |
| - const base::FilePath& application_path); |
| - |
| // Returns true if this distribution should set the Omaha experiment_labels |
| // registry value. |
| virtual bool ShouldSetExperimentLabels(); |
| + virtual bool HasUserExperiments() const; |
|
grt (UTC plus 2)
2013/03/12 14:32:18
although it pains me to say it, un-constify this f
huangs
2013/03/12 18:03:07
Done.
|
| + |
| protected: |
| explicit BrowserDistribution(Type type); |