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

Side by Side Diff: chrome/browser/printing/pwg_raster_converter.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/printing/pwg_raster_converter.h" 5 #include "chrome/browser/printing/pwg_raster_converter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void PwgUtilityProcessHostClient::Convert( 160 void PwgUtilityProcessHostClient::Convert(
161 base::RefCountedMemory* data, 161 base::RefCountedMemory* data,
162 const PWGRasterConverter::ResultCallback& callback) { 162 const PWGRasterConverter::ResultCallback& callback) {
163 DCHECK_CURRENTLY_ON(BrowserThread::UI); 163 DCHECK_CURRENTLY_ON(BrowserThread::UI);
164 callback_ = callback; 164 callback_ = callback;
165 CHECK(!files_); 165 CHECK(!files_);
166 files_.reset(new FileHandlers()); 166 files_.reset(new FileHandlers());
167 BrowserThread::PostTaskAndReply( 167 BrowserThread::PostTaskAndReply(
168 BrowserThread::FILE, FROM_HERE, 168 BrowserThread::FILE, FROM_HERE,
169 base::Bind(&FileHandlers::Init, base::Unretained(files_.get()), 169 base::Bind(&FileHandlers::Init, base::Unretained(files_.get()),
170 make_scoped_refptr(data)), 170 base::RetainedRef(data)),
171 base::Bind(&PwgUtilityProcessHostClient::OnFilesReadyOnUIThread, this)); 171 base::Bind(&PwgUtilityProcessHostClient::OnFilesReadyOnUIThread, this));
172 } 172 }
173 173
174 void PwgUtilityProcessHostClient::OnProcessCrashed(int exit_code) { 174 void PwgUtilityProcessHostClient::OnProcessCrashed(int exit_code) {
175 OnFailed(); 175 OnFailed();
176 } 176 }
177 177
178 bool PwgUtilityProcessHostClient::OnMessageReceived( 178 bool PwgUtilityProcessHostClient::OnMessageReceived(
179 const IPC::Message& message) { 179 const IPC::Message& message) {
180 bool handled = true; 180 bool handled = true;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 357 }
358 } 358 }
359 359
360 result.rotate_all_pages = raster_capability.value().rotate_all_pages; 360 result.rotate_all_pages = raster_capability.value().rotate_all_pages;
361 361
362 result.reverse_page_order = raster_capability.value().reverse_order_streaming; 362 result.reverse_page_order = raster_capability.value().reverse_order_streaming;
363 return result; 363 return result;
364 } 364 }
365 365
366 } // namespace printing 366 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698