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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/browser/printing/print_job.cc ('k') | chrome/browser/printing/print_job_worker.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/printing/print_job_manager.h" 5 #include "chrome/browser/printing/print_job_manager.h"
6 6
7 #include "chrome/browser/printing/print_job.h" 7 #include "chrome/browser/printing/print_job.h"
8 #include "chrome/browser/printing/printer_query.h" 8 #include "chrome/browser/printing/printer_query.h"
9 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 queued_queries_.push_back(make_scoped_refptr(job)); 53 queued_queries_.push_back(make_scoped_refptr(job));
54 DCHECK(job->is_valid()); 54 DCHECK(job->is_valid());
55 } 55 }
56 56
57 void PrintJobManager::PopPrinterQuery(int document_cookie, 57 void PrintJobManager::PopPrinterQuery(int document_cookie,
58 scoped_refptr<PrinterQuery>* job) { 58 scoped_refptr<PrinterQuery>* job) {
59 base::AutoLock lock(lock_); 59 base::AutoLock lock(lock_);
60 for (PrinterQueries::iterator itr = queued_queries_.begin(); 60 for (PrinterQueries::iterator itr = queued_queries_.begin();
61 itr != queued_queries_.end(); 61 itr != queued_queries_.end();
62 ++itr) { 62 ++itr) {
63 PrinterQuery* current_query = *itr; 63 PrinterQuery* current_query = itr->get();
64 if (current_query->cookie() == document_cookie && 64 if (current_query->cookie() == document_cookie &&
65 !current_query->is_callback_pending()) { 65 !current_query->is_callback_pending()) {
66 *job = current_query; 66 *job = current_query;
67 queued_queries_.erase(itr); 67 queued_queries_.erase(itr);
68 DCHECK(current_query->is_valid()); 68 DCHECK(current_query->is_valid());
69 return; 69 return;
70 } 70 }
71 } 71 }
72 } 72 }
73 73
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 break; 117 break;
118 } 118 }
119 default: { 119 default: {
120 NOTREACHED(); 120 NOTREACHED();
121 break; 121 break;
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 } // namespace printing 126 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698