OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Sets |parser_state_| in case the library XML file cannot be opened. | 85 // Sets |parser_state_| in case the library XML file cannot be opened. |
86 // Runs on the IO thread. | 86 // Runs on the IO thread. |
87 void OnOpenLibraryFileFailed(); | 87 void OnOpenLibraryFileFailed(); |
88 | 88 |
89 // Communicates an error to the callback given to the constructor. | 89 // Communicates an error to the callback given to the constructor. |
90 void OnError(); | 90 void OnError(); |
91 | 91 |
92 // UtilityProcessHostClient implementation. | 92 // UtilityProcessHostClient implementation. |
93 // Runs on the IO thread. | 93 // Runs on the IO thread. |
94 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 94 virtual void OnProcessCrashed(int exit_code) override; |
95 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 95 virtual bool OnMessageReceived(const IPC::Message& message) override; |
96 | 96 |
97 base::FilePath library_file_path_; | 97 base::FilePath library_file_path_; |
98 | 98 |
99 // Once we have opened the file, we store the handle so that we can use it | 99 // Once we have opened the file, we store the handle so that we can use it |
100 // once the utility process has launched. | 100 // once the utility process has launched. |
101 base::File library_file_; | 101 base::File library_file_; |
102 | 102 |
103 // Only accessed on the IO thread. | 103 // Only accessed on the IO thread. |
104 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; | 104 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; |
105 | 105 |
106 // Only accessed on the Media Task Runner. | 106 // Only accessed on the Media Task Runner. |
107 ITunesParserCallback itunes_callback_; | 107 ITunesParserCallback itunes_callback_; |
108 | 108 |
109 // Only accessed on the Media Task Runner. | 109 // Only accessed on the Media Task Runner. |
110 IPhotoParserCallback iphoto_callback_; | 110 IPhotoParserCallback iphoto_callback_; |
111 | 111 |
112 // Verifies the messages from the utility process came at the right time. | 112 // Verifies the messages from the utility process came at the right time. |
113 // Initialized on the Media Task Runner, but only accessed on the IO thread. | 113 // Initialized on the Media Task Runner, but only accessed on the IO thread. |
114 ParserState parser_state_; | 114 ParserState parser_state_; |
115 | 115 |
116 DISALLOW_COPY_AND_ASSIGN(SafeIAppsLibraryParser); | 116 DISALLOW_COPY_AND_ASSIGN(SafeIAppsLibraryParser); |
117 }; | 117 }; |
118 | 118 |
119 } // namespace iapps | 119 } // namespace iapps |
120 | 120 |
121 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ | 121 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_IAPPS_LIBRARY_PARSER_H_ |
OLD | NEW |