OLD | NEW |
1 // Copyright (c) 2012 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 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 14 matching lines...) Expand all Loading... |
25 // NOTE: This function returns true only if the flavor the caller specifies has | 25 // NOTE: This function returns true only if the flavor the caller specifies has |
26 // been requested (or if both flavors have been requested). Therefore, it is | 26 // been requested (or if both flavors have been requested). Therefore, it is |
27 // possible that Chrome auto-starts even if this function returns false (since | 27 // possible that Chrome auto-starts even if this function returns false (since |
28 // the other flavor might have been requested). | 28 // the other flavor might have been requested). |
29 // NOTE: Chrome being set to launch in the background (without a window) | 29 // NOTE: Chrome being set to launch in the background (without a window) |
30 // does not necessarily mean that Chrome *will* launch without a window, since | 30 // does not necessarily mean that Chrome *will* launch without a window, since |
31 // when both flavors of the auto-start feature have been requested. In other | 31 // when both flavors of the auto-start feature have been requested. In other |
32 // words, showing a window trumps not showing a window. | 32 // words, showing a window trumps not showing a window. |
33 // ALSO NOTE: |application_path| is optional and should be blank in most cases | 33 // ALSO NOTE: |application_path| is optional and should be blank in most cases |
34 // (as it will default to the application path of the current executable). | 34 // (as it will default to the application path of the current executable). |
35 bool AutoStartRequested(const string16& profile_directory, | 35 bool AutoStartRequested(const base::string16& profile_directory, |
36 bool window_requested, | 36 bool window_requested, |
37 const base::FilePath& application_path); | 37 const base::FilePath& application_path); |
38 | 38 |
39 // Disables all auto-start features. |profile_directory| is the name of the | 39 // Disables all auto-start features. |profile_directory| is the name of the |
40 // directory (leaf, not the full path) that contains the profile that was set | 40 // directory (leaf, not the full path) that contains the profile that was set |
41 // to be opened at user login. | 41 // to be opened at user login. |
42 void DisableAllAutoStartFeatures(const string16& profile_directory); | 42 void DisableAllAutoStartFeatures(const base::string16& profile_directory); |
43 | 43 |
44 // Configures Chrome to auto-launch at user login and show a window. See also | 44 // Configures Chrome to auto-launch at user login and show a window. See also |
45 // EnableBackgroundStartAtLogin, which does the same, except without a window. | 45 // EnableBackgroundStartAtLogin, which does the same, except without a window. |
46 // |profile_directory| is the name of the directory (leaf, not the full path) | 46 // |profile_directory| is the name of the directory (leaf, not the full path) |
47 // that contains the profile that should be opened at user login. | 47 // that contains the profile that should be opened at user login. |
48 // |application_path| is needed when the caller is not the process being set to | 48 // |application_path| is needed when the caller is not the process being set to |
49 // auto-launch, ie. the installer. This is because |application_path|, if left | 49 // auto-launch, ie. the installer. This is because |application_path|, if left |
50 // blank, defaults to the application path of the current executable. | 50 // blank, defaults to the application path of the current executable. |
51 void EnableForegroundStartAtLogin(const string16& profile_directory, | 51 void EnableForegroundStartAtLogin(const base::string16& profile_directory, |
52 const base::FilePath& application_path); | 52 const base::FilePath& application_path); |
53 | 53 |
54 // Disables auto-starting Chrome in foreground mode at user login. | 54 // Disables auto-starting Chrome in foreground mode at user login. |
55 // |profile_directory| is the name of the directory (leaf, not the full path) | 55 // |profile_directory| is the name of the directory (leaf, not the full path) |
56 // that contains the profile that was set to be opened at user login. | 56 // that contains the profile that was set to be opened at user login. |
57 // NOTE: Chrome may still launch if the other auto-start flavor is active | 57 // NOTE: Chrome may still launch if the other auto-start flavor is active |
58 // (background mode). | 58 // (background mode). |
59 void DisableForegroundStartAtLogin(const string16& profile_directory); | 59 void DisableForegroundStartAtLogin(const base::string16& profile_directory); |
60 | 60 |
61 // Requests that Chrome start in Background Mode at user login (without a | 61 // Requests that Chrome start in Background Mode at user login (without a |
62 // window being shown, except if EnableForegroundStartAtLogin has also been | 62 // window being shown, except if EnableForegroundStartAtLogin has also been |
63 // called). | 63 // called). |
64 // In short, EnableBackgroundStartAtLogin is the no-window version of calling | 64 // In short, EnableBackgroundStartAtLogin is the no-window version of calling |
65 // EnableForegroundStartAtLogin). If both are called, a window will be shown on | 65 // EnableForegroundStartAtLogin). If both are called, a window will be shown on |
66 // startup (foreground mode wins). | 66 // startup (foreground mode wins). |
67 void EnableBackgroundStartAtLogin(); | 67 void EnableBackgroundStartAtLogin(); |
68 | 68 |
69 // Disables auto-starting Chrome in background mode at user login. Chrome may | 69 // Disables auto-starting Chrome in background mode at user login. Chrome may |
70 // still launch if the other auto-start flavor is active (foreground mode). | 70 // still launch if the other auto-start flavor is active (foreground mode). |
71 void DisableBackgroundStartAtLogin(); | 71 void DisableBackgroundStartAtLogin(); |
72 | 72 |
73 } // namespace auto_launch_util | 73 } // namespace auto_launch_util |
74 | 74 |
75 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ | 75 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ |
OLD | NEW |