| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ |
| 6 #define CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ | 6 #define CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/string16.h" |
| 10 |
| 9 class FilePath; | 11 class FilePath; |
| 10 | 12 |
| 11 // A namespace containing the platform specific implementation of setting Chrome | 13 // A namespace containing the platform specific implementation of setting Chrome |
| 12 // to launch on computer startup. | 14 // to launch on computer startup. |
| 13 namespace auto_launch_util { | 15 namespace auto_launch_util { |
| 14 | 16 |
| 15 // Returns whether the Chrome executable specified in |application_path| is set | 17 // Returns whether the Chrome executable specified in |application_path| is set |
| 16 // to auto-launch at computer startup. NOTE: |application_path| is optional and | 18 // to auto-launch at computer startup. NOTE: |application_path| is optional and |
| 17 // should be blank in most cases (as it will default to the application path of | 19 // should be blank in most cases (as it will default to the application path of |
| 18 // the current executable). | 20 // the current executable). |profile_directory| is the name of the directory |
| 19 bool WillLaunchAtLogin(const FilePath& application_path); | 21 // (leaf, not the full path) that contains the profile that should be opened at |
| 22 // computer startup. |
| 23 bool WillLaunchAtLogin(const FilePath& application_path, |
| 24 const string16& profile_directory); |
| 20 | 25 |
| 21 // Configures whether the Chrome executable should auto-launch at computer | 26 // Configures whether the Chrome executable should auto-launch at computer |
| 22 // startup. |application_path| is needed when |auto_launch| is true AND when | 27 // startup. |application_path| is needed when |auto_launch| is true AND when |
| 23 // the caller is not the process being set to auto-launch, ie. the installer. | 28 // the caller is not the process being set to auto-launch, ie. the installer. |
| 24 // This is because |application_path|, if left blank, defaults to the | 29 // This is because |application_path|, if left blank, defaults to the |
| 25 // application path of the current executable. If |auto_launch| is true, then it | 30 // application path of the current executable. If |auto_launch| is true, then it |
| 26 // will auto-launch, otherwise it will be configured not to. | 31 // will auto-launch, otherwise it will be configured not to. |profile_directory| |
| 27 void SetWillLaunchAtLogin(bool auto_launch, const FilePath& application_path); | 32 // is the name of the directory (leaf, not the full path) that contains the |
| 33 // profile that should be opened at computer startup. |
| 34 void SetWillLaunchAtLogin(bool auto_launch, |
| 35 const FilePath& application_path, |
| 36 const string16& profile_directory); |
| 28 | 37 |
| 29 } // namespace auto_launch_util | 38 } // namespace auto_launch_util |
| 30 | 39 |
| 31 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ | 40 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ |
| OLD | NEW |