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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_COMMON_AUTO_START_LINUX_H_ 6 #define CHROME_COMMON_AUTO_START_LINUX_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "base/basictypes.h" 12 13 class AutoStart { 14 public: 15 // Registers an application to autostart on user login. |is_terminal_app| 16 // specifies whether the app will run in a terminal window. 17 static bool AddApplication(const std::string& autostart_filename, 18 const std::string& application_name, 19 const std::string& command_line, 20 bool is_terminal_app); 21 // Removes an autostart file. 22 static bool Remove(const std::string& autostart_filename); 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); 30 private: 31 DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart); 32 }; 33 34 #endif // CHROME_COMMON_AUTO_START_LINUX_H_ 35