public void GetProfiles() { this._stat.Status = "Checking Chrome profiles"; Logger.i.AddLog("Checking google chrome profiles"); string app_local = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); string google_user_data_folder = Path.Combine(app_local, "Google\\Chrome\\User Data"); List <string> files = IOHelper.I.GetFilesRecursive(google_user_data_folder, new List <string>()); List <string> ProfileFolders = new List <string>(); foreach (string file in files) { FileInfo fi = new FileInfo(file); if (fi.Name == "Preferences") { Logger.i.AddLog("Google Chrome Profile found: " + fi.Directory.FullName); ProfileFolders.Add(fi.Directory.FullName); _stat.MaxWork += 3; } } foreach (string prof in ProfileFolders) { ChromeProfiles cp = new ChromeProfiles(); cp.DefaultProfile = prof; cp.InitStatus(this._stat); cp.StartCleaning(); } if (DoneRemoving != null) { DoneRemoving(this, new EventArgs()); } }
public void GetProfiles() { this._stat.Status = "Checking Chrome profiles"; Logger.i.AddLog("Checking google chrome profiles"); string app_local = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); string google_user_data_folder = Path.Combine(app_local, "Google\\Chrome\\User Data"); List<string> files = IOHelper.I.GetFilesRecursive(google_user_data_folder, new List<string>()); List<string> ProfileFolders = new List<string>(); foreach (string file in files) { FileInfo fi = new FileInfo(file); if (fi.Name == "Preferences") { Logger.i.AddLog("Google Chrome Profile found: " + fi.Directory.FullName); ProfileFolders.Add(fi.Directory.FullName); _stat.MaxWork += 3; } } foreach (string prof in ProfileFolders) { ChromeProfiles cp = new ChromeProfiles(); cp.DefaultProfile = prof; cp.InitStatus(this._stat); cp.StartCleaning(); } if (DoneRemoving != null) { DoneRemoving(this, new EventArgs()); } }