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

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

Issue 524543002: Removed IDC_PRINT_TO_DESTINATION. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri Aug 29 14:26:26 PDT 2014 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
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/printer_query.h » ('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 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/print_view_manager_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 544 }
545 return Send(message); 545 return Send(message);
546 } 546 }
547 547
548 void PrintViewManagerBase::ReleasePrinterQuery() { 548 void PrintViewManagerBase::ReleasePrinterQuery() {
549 if (!cookie_) 549 if (!cookie_)
550 return; 550 return;
551 551
552 int cookie = cookie_; 552 int cookie = cookie_;
553 cookie_ = 0; 553 cookie_ = 0;
554 queue_->SetDestination(NULL);
555
556 554
557 printing::PrintJobManager* print_job_manager = 555 printing::PrintJobManager* print_job_manager =
558 g_browser_process->print_job_manager(); 556 g_browser_process->print_job_manager();
559 // May be NULL in tests. 557 // May be NULL in tests.
560 if (!print_job_manager) 558 if (!print_job_manager)
561 return; 559 return;
562 560
563 scoped_refptr<printing::PrinterQuery> printer_query; 561 scoped_refptr<printing::PrinterQuery> printer_query;
564 printer_query = queue_->PopPrinterQuery(cookie); 562 printer_query = queue_->PopPrinterQuery(cookie);
565 if (!printer_query.get()) 563 if (!printer_query.get())
566 return; 564 return;
567 BrowserThread::PostTask( 565 BrowserThread::PostTask(
568 BrowserThread::IO, FROM_HERE, 566 BrowserThread::IO, FROM_HERE,
569 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 567 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
570 } 568 }
571 569
572 } // namespace printing 570 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/browser/printing/printer_query.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698