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