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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 191913002: scoped_ptr<DEVMODE[]> replaced with scoped_ptr<DEVMODE, base::FreeDeleter>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/service/cloud_print/cdd_conversion_win.cc ('k') | printing/backend/print_backend_win.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/service/cloud_print/print_system.h" 5 #include "chrome/service/cloud_print/print_system.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 JobSpooler::Delegate* delegate) { 263 JobSpooler::Delegate* delegate) {
264 if (delegate_) { 264 if (delegate_) {
265 // We are already in the process of printing. 265 // We are already in the process of printing.
266 NOTREACHED(); 266 NOTREACHED();
267 return false; 267 return false;
268 } 268 }
269 base::string16 printer_wide = base::UTF8ToWide(printer_name); 269 base::string16 printer_wide = base::UTF8ToWide(printer_name);
270 last_page_printed_ = -1; 270 last_page_printed_ = -1;
271 // We only support PDF and XPS documents for now. 271 // We only support PDF and XPS documents for now.
272 if (print_data_mime_type == kContentTypePDF) { 272 if (print_data_mime_type == kContentTypePDF) {
273 scoped_ptr<DEVMODE[]> dev_mode; 273 scoped_ptr<DEVMODE, base::FreeDeleter> dev_mode;
274 if (print_ticket_mime_type == kContentTypeJSON) { 274 if (print_ticket_mime_type == kContentTypeJSON) {
275 dev_mode = CjtToDevMode(printer_wide, print_ticket); 275 dev_mode = CjtToDevMode(printer_wide, print_ticket);
276 } else { 276 } else {
277 DCHECK(print_ticket_mime_type == kContentTypeXML); 277 DCHECK(print_ticket_mime_type == kContentTypeXML);
278 dev_mode = printing::XpsTicketToDevMode(printer_wide, print_ticket); 278 dev_mode = printing::XpsTicketToDevMode(printer_wide, print_ticket);
279 } 279 }
280 280
281 if (!dev_mode) { 281 if (!dev_mode) {
282 NOTREACHED(); 282 NOTREACHED();
283 return false; 283 return false;
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 834 }
835 835
836 } // namespace 836 } // namespace
837 837
838 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( 838 scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
839 const base::DictionaryValue* print_system_settings) { 839 const base::DictionaryValue* print_system_settings) {
840 return new PrintSystemWin; 840 return new PrintSystemWin;
841 } 841 }
842 842
843 } // namespace cloud_print 843 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cdd_conversion_win.cc ('k') | printing/backend/print_backend_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698