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

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: merge with trunk 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 IPC_END_MESSAGE_MAP_EX() 191 IPC_END_MESSAGE_MAP_EX()
192 return handled; 192 return handled;
193 } 193 }
194 194
195 void ServiceUtilityProcessHost::Client::MetafileAvailable( 195 void ServiceUtilityProcessHost::Client::MetafileAvailable(
196 const FilePath& metafile_path, 196 const FilePath& metafile_path,
197 int highest_rendered_page_number) { 197 int highest_rendered_page_number) {
198 // The metafile was created in a temp folder which needs to get deleted after 198 // The metafile was created in a temp folder which needs to get deleted after
199 // we have processed it. 199 // we have processed it.
200 ScopedTempDir scratch_metafile_dir; 200 ScopedTempDir scratch_metafile_dir;
201 scratch_metafile_dir.Set(metafile_path.DirName()); 201 if (!scratch_metafile_dir.Set(metafile_path.DirName()))
202 LOG(WARNING) << "Unable to set scratch metafile directory";
202 #if defined(OS_WIN) 203 #if defined(OS_WIN)
203 printing::NativeMetafile metafile; 204 printing::NativeMetafile metafile;
204 if (!metafile.CreateFromFile(metafile_path)) { 205 if (!metafile.CreateFromFile(metafile_path)) {
205 OnRenderPDFPagesToMetafileFailed(); 206 OnRenderPDFPagesToMetafileFailed();
206 } else { 207 } else {
207 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number); 208 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number);
208 // Close it so that ScopedTempDir can delete the folder. 209 // Close it so that ScopedTempDir can delete the folder.
209 metafile.CloseEmf(); 210 metafile.CloseEmf();
210 } 211 }
211 #endif // defined(OS_WIN) 212 #endif // defined(OS_WIN)
212 } 213 }
213 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