| 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 #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h" | 5 #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 10 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return; | 77 return; |
| 78 | 78 |
| 79 if (utility_process_host_->GetData().handle == base::kNullProcessHandle) { | 79 if (utility_process_host_->GetData().handle == base::kNullProcessHandle) { |
| 80 DLOG(ERROR) << "Child process handle is null"; | 80 DLOG(ERROR) << "Child process handle is null"; |
| 81 OnError(); | 81 OnError(); |
| 82 return; | 82 return; |
| 83 } | 83 } |
| 84 | 84 |
| 85 if (!itunes_callback_.is_null()) { | 85 if (!itunes_callback_.is_null()) { |
| 86 utility_process_host_->Send(new ChromeUtilityMsg_ParseITunesLibraryXmlFile( | 86 utility_process_host_->Send(new ChromeUtilityMsg_ParseITunesLibraryXmlFile( |
| 87 IPC::TakeFileHandleForProcess( | 87 IPC::TakePlatformFileForTransit(std::move(library_file_)))); |
| 88 std::move(library_file_), | |
| 89 utility_process_host_->GetData().handle))); | |
| 90 } | 88 } |
| 91 | 89 |
| 92 parser_state_ = STARTED_PARSING_STATE; | 90 parser_state_ = STARTED_PARSING_STATE; |
| 93 } | 91 } |
| 94 | 92 |
| 95 void SafeIAppsLibraryParser::OnGotITunesLibrary( | 93 void SafeIAppsLibraryParser::OnGotITunesLibrary( |
| 96 bool result, const itunes::parser::Library& library) { | 94 bool result, const itunes::parser::Library& library) { |
| 97 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 95 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 98 DCHECK(!itunes_callback_.is_null()); | 96 DCHECK(!itunes_callback_.is_null()); |
| 99 | 97 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 128 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted, | 126 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted, |
| 129 OnUtilityProcessStarted) | 127 OnUtilityProcessStarted) |
| 130 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesLibrary, | 128 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesLibrary, |
| 131 OnGotITunesLibrary) | 129 OnGotITunesLibrary) |
| 132 IPC_MESSAGE_UNHANDLED(handled = false) | 130 IPC_MESSAGE_UNHANDLED(handled = false) |
| 133 IPC_END_MESSAGE_MAP() | 131 IPC_END_MESSAGE_MAP() |
| 134 return handled; | 132 return handled; |
| 135 } | 133 } |
| 136 | 134 |
| 137 } // namespace iapps | 135 } // namespace iapps |
| OLD | NEW |