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

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

Issue 506163002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/printing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (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/printing/print_preview_message_handler.h" 5 #include "chrome/browser/printing/print_preview_message_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 20 matching lines...) Expand all
31 31
32 namespace { 32 namespace {
33 33
34 void StopWorker(int document_cookie) { 34 void StopWorker(int document_cookie) {
35 if (document_cookie <= 0) 35 if (document_cookie <= 0)
36 return; 36 return;
37 scoped_refptr<printing::PrintQueriesQueue> queue = 37 scoped_refptr<printing::PrintQueriesQueue> queue =
38 g_browser_process->print_job_manager()->queue(); 38 g_browser_process->print_job_manager()->queue();
39 scoped_refptr<printing::PrinterQuery> printer_query = 39 scoped_refptr<printing::PrinterQuery> printer_query =
40 queue->PopPrinterQuery(document_cookie); 40 queue->PopPrinterQuery(document_cookie);
41 if (printer_query) { 41 if (printer_query.get()) {
42 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 42 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
43 base::Bind(&printing::PrinterQuery::StopWorker, 43 base::Bind(&printing::PrinterQuery::StopWorker,
44 printer_query)); 44 printer_query));
45 } 45 }
46 } 46 }
47 47
48 base::RefCountedBytes* GetDataFromHandle(base::SharedMemoryHandle handle, 48 base::RefCountedBytes* GetDataFromHandle(base::SharedMemoryHandle handle,
49 uint32 data_size) { 49 uint32 data_size) {
50 scoped_ptr<base::SharedMemory> shared_buf( 50 scoped_ptr<base::SharedMemory> shared_buf(
51 new base::SharedMemory(handle, true)); 51 new base::SharedMemory(handle, true));
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings, 223 IPC_MESSAGE_HANDLER(PrintHostMsg_PrintPreviewInvalidPrinterSettings,
224 OnInvalidPrinterSettings) 224 OnInvalidPrinterSettings)
225 IPC_MESSAGE_HANDLER(PrintHostMsg_SetOptionsFromDocument, 225 IPC_MESSAGE_HANDLER(PrintHostMsg_SetOptionsFromDocument,
226 OnSetOptionsFromDocument) 226 OnSetOptionsFromDocument)
227 IPC_MESSAGE_UNHANDLED(handled = false) 227 IPC_MESSAGE_UNHANDLED(handled = false)
228 IPC_END_MESSAGE_MAP() 228 IPC_END_MESSAGE_MAP()
229 return handled; 229 return handled;
230 } 230 }
231 231
232 } // namespace printing 232 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker.cc ('k') | chrome/browser/printing/print_view_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698