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

Side by Side Diff: chrome/service/service_utility_process_host.cc

Issue 6042009: Added WARN_UNUSED_RESULT to ScopedTempDir methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous IsValid check Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/service/service_utility_process_host.h" 5 #include "chrome/service/service_utility_process_host.h"
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 IPC_END_MESSAGE_MAP_EX() 187 IPC_END_MESSAGE_MAP_EX()
188 return handled; 188 return handled;
189 } 189 }
190 190
191 void ServiceUtilityProcessHost::Client::MetafileAvailable( 191 void ServiceUtilityProcessHost::Client::MetafileAvailable(
192 const FilePath& metafile_path, 192 const FilePath& metafile_path,
193 int highest_rendered_page_number) { 193 int highest_rendered_page_number) {
194 // The metafile was created in a temp folder which needs to get deleted after 194 // The metafile was created in a temp folder which needs to get deleted after
195 // we have processed it. 195 // we have processed it.
196 ScopedTempDir scratch_metafile_dir; 196 ScopedTempDir scratch_metafile_dir;
197 scratch_metafile_dir.Set(metafile_path.DirName()); 197 if (!scratch_metafile_dir.Set(metafile_path.DirName())) {
sanjeevr 2011/01/07 04:38:57 The only use to the scratch_metafile_dir is to del
cbentzel 2011/01/10 14:14:36 Moved to LOG(WARNING) and fallthrough in this case
198 // This will happen if metafile_path is invalid. It could potentially
199 // be strengthened to a CHECK.
200 OnRenderPDFPagesToMetafileFailed();
201 return;
202 }
198 #if defined(OS_WIN) 203 #if defined(OS_WIN)
199 printing::NativeMetafile metafile; 204 printing::NativeMetafile metafile;
200 if (!metafile.CreateFromFile(metafile_path)) { 205 if (!metafile.CreateFromFile(metafile_path)) {
201 OnRenderPDFPagesToMetafileFailed(); 206 OnRenderPDFPagesToMetafileFailed();
202 } else { 207 } else {
203 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number); 208 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number);
204 // Close it so that ScopedTempDir can delete the folder. 209 // Close it so that ScopedTempDir can delete the folder.
205 metafile.CloseEmf(); 210 metafile.CloseEmf();
206 } 211 }
207 #endif // defined(OS_WIN) 212 #endif // defined(OS_WIN)
208 } 213 }
209 214
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_uitest.cc ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698