1 // Copyright 2018 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_CHROME_CLEANER_TEST_REBOOT_DELETION_HELPER_H_
6 #define CHROME_CHROME_CLEANER_TEST_REBOOT_DELETION_HELPER_H_
7 
8 #include <string>
9 #include <utility>
10 #include <vector>
11 
12 #include "chrome/chrome_cleaner/os/file_path_set.h"
13 
14 namespace chrome_cleaner {
15 
16 // Holds the (source, destination) paths of a pending move. An empty
17 // destination string means deletion instead of move.
18 typedef std::pair<std::wstring, std::wstring> PendingMove;
19 typedef std::vector<PendingMove> PendingMoveVector;
20 
21 // Returns true if the given file is registered to be deleted on the next
22 // reboot.
23 bool IsFileRegisteredForPostRebootRemoval(const base::FilePath& file_path);
24 
25 // Unregister all of the given files from being registered to be deleted after
26 // the next reboot.
27 bool UnregisterPostRebootRemovals(const FilePathSet& paths);
28 
29 // Get the list of all the pending post reboot moves.
30 bool GetPendingMoves(PendingMoveVector* pending_moves);
31 
32 // Set all the pending moves for the nest reboot.
33 bool SetPendingMoves(const PendingMoveVector& pending_moves);
34 
35 }  // namespace chrome_cleaner
36 
37 #endif  // CHROME_CHROME_CLEANER_TEST_REBOOT_DELETION_HELPER_H_
38