OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 virtual ~ZipFileCreator(); | 41 virtual ~ZipFileCreator(); |
42 | 42 |
43 // Called after the file handle is opened on blocking pool. | 43 // Called after the file handle is opened on blocking pool. |
44 void OnOpenFileHandle(base::File file); | 44 void OnOpenFileHandle(base::File file); |
45 | 45 |
46 // Starts the utility process that creates the zip file. | 46 // Starts the utility process that creates the zip file. |
47 void StartProcessOnIOThread(base::File dest_file); | 47 void StartProcessOnIOThread(base::File dest_file); |
48 | 48 |
49 // UtilityProcessHostClient | 49 // UtilityProcessHostClient |
50 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 50 virtual bool OnMessageReceived(const IPC::Message& message) override; |
51 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 51 virtual void OnProcessCrashed(int exit_code) override; |
52 | 52 |
53 // IPC message handlers. | 53 // IPC message handlers. |
54 void OnCreateZipFileSucceeded(); | 54 void OnCreateZipFileSucceeded(); |
55 void OnCreateZipFileFailed(); | 55 void OnCreateZipFileFailed(); |
56 | 56 |
57 void ReportDone(bool success); | 57 void ReportDone(bool success); |
58 | 58 |
59 // The callback. | 59 // The callback. |
60 ResultCallback callback_; | 60 ResultCallback callback_; |
61 | 61 |
62 // The source directory for input files. | 62 // The source directory for input files. |
63 base::FilePath src_dir_; | 63 base::FilePath src_dir_; |
64 | 64 |
65 // The list of source files paths to be included in the zip file. | 65 // The list of source files paths to be included in the zip file. |
66 // Entries are relative paths under directory |src_dir_|. | 66 // Entries are relative paths under directory |src_dir_|. |
67 std::vector<base::FilePath> src_relative_paths_; | 67 std::vector<base::FilePath> src_relative_paths_; |
68 | 68 |
69 // The output zip file. | 69 // The output zip file. |
70 base::FilePath dest_file_; | 70 base::FilePath dest_file_; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace file_manager | 73 } // namespace file_manager |
74 | 74 |
75 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ | 75 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_ZIP_FILE_CREATOR_H_ |
OLD | NEW |