| Index: chrome/installer/util/auto_launch_util.h
|
| ===================================================================
|
| --- chrome/installer/util/auto_launch_util.h (revision 132169)
|
| +++ chrome/installer/util/auto_launch_util.h (working copy)
|
| @@ -14,26 +14,45 @@
|
| // to launch on computer startup.
|
| namespace auto_launch_util {
|
|
|
| +// We use one Run key with flags specifying which feature we want to start up.
|
| +// When we change our Run key we need to specify what we want to do with each
|
| +// flag. This lists the possible actions we can take with the flags.
|
| +enum FlagSetting {
|
| + FLAG_DISABLE, // Disable the flag.
|
| + FLAG_ENABLE, // Enable the flag.
|
| + FLAG_PRESERVE, // Preserve the value that the flag has currently.
|
| +};
|
| +
|
| // Returns whether the Chrome executable specified in |application_path| is set
|
| -// to auto-launch at computer startup. NOTE: |application_path| is optional and
|
| -// should be blank in most cases (as it will default to the application path of
|
| -// the current executable). |profile_directory| is the name of the directory
|
| -// (leaf, not the full path) that contains the profile that should be opened at
|
| -// computer startup.
|
| -bool WillLaunchAtLogin(const FilePath& application_path,
|
| - const string16& profile_directory);
|
| +// to auto-launch at computer startup with a given |command_line_switch|.
|
| +// NOTE: |application_path| is optional and should be blank in most cases (as
|
| +// it will default to the application path of the current executable).
|
| +// |profile_directory| is the name of the directory (leaf, not the full path)
|
| +// that contains the profile that should be opened at computer startup.
|
| +// |command_line_switch| is the switch we are optionally interested in and, if
|
| +// not blank, must be present for the function to return true.
|
| +bool WillLaunchAtLoginWithSwitch(const FilePath& application_path,
|
| + const string16& profile_directory,
|
| + const std::string& command_line_switch);
|
|
|
| -// Configures whether the Chrome executable should auto-launch at computer
|
| -// startup. |application_path| is needed when |auto_launch| is true AND when
|
| -// the caller is not the process being set to auto-launch, ie. the installer.
|
| -// This is because |application_path|, if left blank, defaults to the
|
| -// application path of the current executable. If |auto_launch| is true, then it
|
| -// will auto-launch, otherwise it will be configured not to. |profile_directory|
|
| -// is the name of the directory (leaf, not the full path) that contains the
|
| -// profile that should be opened at computer startup.
|
| -void SetWillLaunchAtLogin(bool auto_launch,
|
| - const FilePath& application_path,
|
| - const string16& profile_directory);
|
| +// Configures which flag should be present when the Chrome executable
|
| +// auto-launches at computer startup. |application_path| is needed when one or
|
| +// more flags is being set AND when the caller is not the process being set to
|
| +// auto-launch, ie. the installer. This is because |application_path|, if left
|
| +// blank, defaults to the application path of the current executable.
|
| +// |profile_directory| is the name of the directory (leaf, not the full path)
|
| +// that contains the profile that should be opened at computer startup.
|
| +// |auto_start_feature| is the feature that launches Chrome with a window at
|
| +// computer startup. |background_mode| launches Chrome in the background without
|
| +// a window. If both |background_mode| and |auto_start_feature| are enabled, the
|
| +// |auto_start_feature| will win and a window will be shown. We don't remove the
|
| +// |background_mode| flag when |auto_start_feature| is turned on because the
|
| +// user might turn off auto_start at any time from the settings page, leaving
|
| +// only |background_mode|.
|
| +void SetWillLaunchAtLogin(const FilePath& application_path,
|
| + const string16& profile_directory,
|
| + FlagSetting auto_start_feature,
|
| + FlagSetting background_mode);
|
|
|
| } // namespace auto_launch_util
|
|
|
|
|