OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_AUTO_START_LINUX_H_ | 5 #ifndef CHROME_COMMON_AUTO_START_LINUX_H_ |
6 #define CHROME_COMMON_AUTO_START_LINUX_H_ | 6 #define CHROME_COMMON_AUTO_START_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 | 12 |
13 class AutoStart { | 13 class AutoStart { |
14 public: | 14 public: |
15 // Registers an application to autostart on user login. |is_terminal_app| | 15 // Registers an application to autostart on user login. |is_terminal_app| |
16 // specifies whether the app will run in a terminal window. | 16 // specifies whether the app will run in a terminal window. |
17 static bool AddApplication(const std::string& autostart_filename, | 17 static bool AddApplication(const std::string& autostart_filename, |
18 const std::string& application_name, | 18 const std::string& application_name, |
19 const std::string& command_line, | 19 const std::string& command_line, |
20 bool is_terminal_app); | 20 bool is_terminal_app); |
21 // Removes an autostart file. | 21 // Removes an autostart file. |
22 static bool Remove(const std::string& autostart_filename); | 22 static bool Remove(const std::string& autostart_filename); |
23 | 23 // Gets the entire contents of an autostart file. |
| 24 static bool GetAutostartFileContents(const std::string& autostart_filename, |
| 25 std::string* contents); |
| 26 // Gets a specific value from an autostart file. |
| 27 static bool GetAutostartFileValue(const std::string& autostart_filename, |
| 28 const std::string& value_name, |
| 29 std::string* value); |
24 private: | 30 private: |
25 DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart); | 31 DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart); |
26 }; | 32 }; |
27 | 33 |
28 #endif // CHROME_COMMON_AUTO_START_LINUX_H_ | 34 #endif // CHROME_COMMON_AUTO_START_LINUX_H_ |
OLD | NEW |