Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/installer/util/auto_launch_util.h

Issue 9972012: Resolve the conflict that auto-launch has with the background mode feature (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 10
11 class FilePath; 11 class FilePath;
12 12
13 // A namespace containing the platform specific implementation of setting Chrome 13 // A namespace containing the platform specific implementation of setting Chrome
14 // to launch on computer startup. 14 // to launch on computer startup.
15 namespace auto_launch_util { 15 namespace auto_launch_util {
16 16
17 // Returns whether the Chrome executable specified in |application_path| is set 17 // Returns whether the Chrome executable specified in |application_path| is set
18 // to auto-launch at computer startup. NOTE: |application_path| is optional and 18 // to auto-launch at computer startup with a given |command_line_switch|.
19 // should be blank in most cases (as it will default to the application path of 19 // NOTE: |application_path| is optional and should be blank in most cases (as
20 // the current executable). |profile_directory| is the name of the directory 20 // it will default to the application path of the current executable).
21 // (leaf, not the full path) that contains the profile that should be opened at 21 // |profile_directory| is the name of the directory (leaf, not the full path)
22 // computer startup. 22 // that contains the profile that should be opened at computer startup.
23 bool WillLaunchAtLogin(const FilePath& application_path, 23 // |command_line_switch| is the switch we are optionally interested in and, if
24 const string16& profile_directory); 24 // not blank, must be present for the function to return true.
Andrew T Wilson (Slow) 2012/04/16 22:57:33 Not sure what the behavior is if command_line_swit
Finnur 2012/04/17 12:27:45 Correct. That function is private now but I'll upd
25 bool WillLaunchAtLoginWithSwitch(const FilePath& application_path,
26 const string16& profile_directory,
27 const std::string& command_line_switch);
25 28
26 // Configures whether the Chrome executable should auto-launch at computer 29 // Disables all auto-start features. |profile_directory| is the name of the
27 // startup. |application_path| is needed when |auto_launch| is true AND when 30 // directory (leaf, not the full path) that contains the profile that was set
28 // the caller is not the process being set to auto-launch, ie. the installer. 31 // to be opened at computer startup.
29 // This is because |application_path|, if left blank, defaults to the 32 void DisableAllAutostartFeatures(const string16& profile_directory);
30 // application path of the current executable. If |auto_launch| is true, then it 33
31 // will auto-launch, otherwise it will be configured not to. |profile_directory| 34 // Configures Chrome to auto-launch at computer startup and show a window.
32 // is the name of the directory (leaf, not the full path) that contains the 35 // |application_path| is needed when one when the caller is not the process
Andrew T Wilson (Slow) 2012/04/16 22:57:33 remove "when one"
33 // profile that should be opened at computer startup. 36 // being set to auto-launch, ie. the installer. This is because
34 void SetWillLaunchAtLogin(bool auto_launch, 37 // |application_path|, if left blank, defaults to the application path of the
35 const FilePath& application_path, 38 // current executable.
36 const string16& profile_directory); 39 // |profile_directory| is the name of the directory (leaf, not the full path)
40 // that contains the profile that should be opened at computer startup.
41 void EnableAutoStartAtLogin(const FilePath& application_path,
42 const string16& profile_directory);
43 // Disables autostarting Chrome at computer startup. |profile_directory| is the
grt (UTC plus 2) 2012/04/16 19:43:58 nit: insert newline before comment
44 // name of the directory (leaf, not the full path) that contains the profile
45 // that was set to be opened at computer startup.
46 void DisableAutoStartAtLogin(const string16& profile_directory);
47
48 // Enables Chrome to start in the background at computer startup (without a
49 // window being shown, except if EnableAutoStartAtLogin has been called).
50 // In short, EnableBackgroundModeAtLogin is the no-window version of calling
51 // EnableAutoStartAtLogin). If both are called, the no-window setting is
52 // ignored.
53 // |application_path| is needed when one when the caller is not the process
54 // being set to auto-launch, ie. the installer. This is because
55 // |application_path|, if left blank, defaults to the application path of the
56 // current executable.
57 // |profile_directory| is the name of the directory (leaf, not the full path)
58 // that contains the profile that should be opened at computer startup.
59 void EnableBackgroundModeAtLogin(const FilePath& application_path,
Andrew T Wilson (Slow) 2012/04/16 22:57:33 I don't think we need the profile_directory for th
60 const string16& profile_directory);
61 // Disables autostarting Chrome in background mode at computer startup.
grt (UTC plus 2) 2012/04/16 19:43:58 nit: insert newline before comment
62 // |profile_directory| is the name of the directory (leaf, not the full path)
63 // that contains the profile that was set to be opened at computer startup.
64 void DisableBackgroundModeAtLogin(const string16& profile_directory);
Andrew T Wilson (Slow) 2012/04/16 22:57:33 Likewise, this shouldn't need to take a path (see
37 65
38 } // namespace auto_launch_util 66 } // namespace auto_launch_util
39 67
40 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_ 68 #endif // CHROME_INSTALLER_UTIL_AUTO_LAUNCH_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698