Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc

Issue 1862333002: ipc: Rename TakeFileHandleForProcess->TakePlatformFileForTransit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_picasa_album_table_reader. h" 5 #include "chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void SafePicasaAlbumTableReader::OnProcessStarted() { 80 void SafePicasaAlbumTableReader::OnProcessStarted() {
81 DCHECK_CURRENTLY_ON(BrowserThread::IO); 81 DCHECK_CURRENTLY_ON(BrowserThread::IO);
82 if (parser_state_ != PINGED_UTILITY_PROCESS_STATE) 82 if (parser_state_ != PINGED_UTILITY_PROCESS_STATE)
83 return; 83 return;
84 84
85 if (utility_process_host_->GetData().handle == base::kNullProcessHandle) { 85 if (utility_process_host_->GetData().handle == base::kNullProcessHandle) {
86 DLOG(ERROR) << "Child process handle is null"; 86 DLOG(ERROR) << "Child process handle is null";
87 } 87 }
88 AlbumTableFilesForTransit files_for_transit; 88 AlbumTableFilesForTransit files_for_transit;
89 files_for_transit.indicator_file = IPC::TakeFileHandleForProcess( 89 files_for_transit.indicator_file = IPC::TakePlatformFileForTransit(
90 std::move(album_table_files_.indicator_file), 90 std::move(album_table_files_.indicator_file));
91 utility_process_host_->GetData().handle); 91 files_for_transit.category_file = IPC::TakePlatformFileForTransit(
92 files_for_transit.category_file = 92 std::move(album_table_files_.category_file));
93 IPC::TakeFileHandleForProcess(std::move(album_table_files_.category_file),
94 utility_process_host_->GetData().handle);
95 files_for_transit.date_file = 93 files_for_transit.date_file =
96 IPC::TakeFileHandleForProcess(std::move(album_table_files_.date_file), 94 IPC::TakePlatformFileForTransit(std::move(album_table_files_.date_file));
97 utility_process_host_->GetData().handle); 95 files_for_transit.filename_file = IPC::TakePlatformFileForTransit(
98 files_for_transit.filename_file = 96 std::move(album_table_files_.filename_file));
99 IPC::TakeFileHandleForProcess(std::move(album_table_files_.filename_file),
100 utility_process_host_->GetData().handle);
101 files_for_transit.name_file = 97 files_for_transit.name_file =
102 IPC::TakeFileHandleForProcess(std::move(album_table_files_.name_file), 98 IPC::TakePlatformFileForTransit(std::move(album_table_files_.name_file));
103 utility_process_host_->GetData().handle);
104 files_for_transit.token_file = 99 files_for_transit.token_file =
105 IPC::TakeFileHandleForProcess(std::move(album_table_files_.token_file), 100 IPC::TakePlatformFileForTransit(std::move(album_table_files_.token_file));
106 utility_process_host_->GetData().handle);
107 files_for_transit.uid_file = 101 files_for_transit.uid_file =
108 IPC::TakeFileHandleForProcess(std::move(album_table_files_.uid_file), 102 IPC::TakePlatformFileForTransit(std::move(album_table_files_.uid_file));
109 utility_process_host_->GetData().handle);
110 utility_process_host_->Send(new ChromeUtilityMsg_ParsePicasaPMPDatabase( 103 utility_process_host_->Send(new ChromeUtilityMsg_ParsePicasaPMPDatabase(
111 files_for_transit)); 104 files_for_transit));
112 parser_state_ = STARTED_PARSING_STATE; 105 parser_state_ = STARTED_PARSING_STATE;
113 } 106 }
114 107
115 void SafePicasaAlbumTableReader::OnParsePicasaPMPDatabaseFinished( 108 void SafePicasaAlbumTableReader::OnParsePicasaPMPDatabaseFinished(
116 bool parse_success, 109 bool parse_success,
117 const std::vector<AlbumInfo>& albums, 110 const std::vector<AlbumInfo>& albums,
118 const std::vector<AlbumInfo>& folders) { 111 const std::vector<AlbumInfo>& folders) {
119 DCHECK_CURRENTLY_ON(BrowserThread::IO); 112 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 19 matching lines...) Expand all
139 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted, 132 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted,
140 OnProcessStarted) 133 OnProcessStarted)
141 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished, 134 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished,
142 OnParsePicasaPMPDatabaseFinished) 135 OnParsePicasaPMPDatabaseFinished)
143 IPC_MESSAGE_UNHANDLED(handled = false) 136 IPC_MESSAGE_UNHANDLED(handled = false)
144 IPC_END_MESSAGE_MAP() 137 IPC_END_MESSAGE_MAP()
145 return handled; 138 return handled;
146 } 139 }
147 140
148 } // namespace picasa 141 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc ('k') | chrome/browser/printing/pwg_raster_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698