mCleaner.Logics.Commands.CommandLogic_Chrome.CleanAutofill C# (CSharp) Method

CleanAutofill() public static method

public static CleanAutofill ( string file ) : string
file string
return string
        public static string CleanAutofill(string file)
        {
            string ret = string.Empty;

            string sql = string.Empty;
            sql = "";
            string where = string.Empty;
            string[] cols = new string[] {
                "name", "value", "value_lower"
            };
            if (Shred)
            {
                sql += CreateRandomBlobQuery(cols, "autofill", where);
            }
            sql = string.Format("delete from autofill {0};", where);
            string result = SQLite.ExecuteNonQuery(file, sql);

            if (result != string.Empty)
            {
                ret = "An unkown error occured while executing a query in CommandLogic_Chrome.CleanAutofill";

                if (result.Contains("database is locked"))
                {
                    ret = "database is locked";
                }
            }

            return ret;
        }