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

Side by Side Diff: chrome/browser/image_decoder.cc

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/printing/pdf_to_emf_converter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/image_decoder.h" 5 #include "chrome/browser/image_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // utility process, and whether the request has been sent at all. 230 // utility process, and whether the request has been sent at all.
231 for (const auto& request : requests) 231 for (const auto& request : requests)
232 OnDecodeImageFailed(request.first); 232 OnDecodeImageFailed(request.first);
233 } 233 }
234 234
235 void ImageDecoder::OnProcessCrashed(int exit_code) { 235 void ImageDecoder::OnProcessCrashed(int exit_code) {
236 DCHECK_CURRENTLY_ON(BrowserThread::IO); 236 DCHECK_CURRENTLY_ON(BrowserThread::IO);
237 FailAllRequests(); 237 FailAllRequests();
238 } 238 }
239 239
240 void ImageDecoder::OnProcessLaunchFailed() { 240 void ImageDecoder::OnProcessLaunchFailed(int error_code) {
241 DCHECK_CURRENTLY_ON(BrowserThread::IO); 241 DCHECK_CURRENTLY_ON(BrowserThread::IO);
242 FailAllRequests(); 242 FailAllRequests();
243 } 243 }
244 244
245 bool ImageDecoder::OnMessageReceived(const IPC::Message& message) { 245 bool ImageDecoder::OnMessageReceived(const IPC::Message& message) {
246 return false; 246 return false;
247 } 247 }
248 248
249 void ImageDecoder::OnDecodeImageSucceeded( 249 void ImageDecoder::OnDecodeImageSucceeded(
250 const SkBitmap& decoded_image, 250 const SkBitmap& decoded_image,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 auto it = image_request_id_map_.find(request_id); 300 auto it = image_request_id_map_.find(request_id);
301 if (it == image_request_id_map_.end()) 301 if (it == image_request_id_map_.end())
302 return; 302 return;
303 image_request = it->second; 303 image_request = it->second;
304 image_request_id_map_.erase(it); 304 image_request_id_map_.erase(it);
305 } 305 }
306 306
307 DCHECK(image_request->task_runner()->RunsTasksOnCurrentThread()); 307 DCHECK(image_request->task_runner()->RunsTasksOnCurrentThread());
308 image_request->OnDecodeImageFailed(); 308 image_request->OnDecodeImageFailed();
309 } 309 }
OLDNEW
« no previous file with comments | « chrome/browser/image_decoder.h ('k') | chrome/browser/printing/pdf_to_emf_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698