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

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

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_worker.h" 5 #include "chrome/browser/printing/print_job_worker.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/printing/print_job.h" 8 #include "chrome/browser/printing/print_job.h"
9 #include "chrome/common/notification_service.h" 9 #include "chrome/common/notification_service.h"
10 #include "printing/printed_document.h" 10 #include "printing/printed_document.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 owner_->message_loop()->PostTask(FROM_HERE, task); 268 owner_->message_loop()->PostTask(FROM_HERE, task);
269 Cancel(); 269 Cancel();
270 270
271 // Makes sure the variables are reinitialized. 271 // Makes sure the variables are reinitialized.
272 document_ = NULL; 272 document_ = NULL;
273 page_number_ = PageNumber::npos(); 273 page_number_ = PageNumber::npos();
274 } 274 }
275 275
276 } // namespace printing 276 } // namespace printing
277 277
278 RunnableMethodTraits<printing::PrintJobWorker>::RunnableMethodTraits() {
279 }
280
281 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee( 278 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee(
282 printing::PrintJobWorker* obj) { 279 printing::PrintJobWorker* obj) {
283 DCHECK(!owner_.get()); 280 DCHECK(!owner_.get());
284 owner_ = obj->owner_; 281 owner_ = obj->owner_;
285 } 282 }
286 283
287 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee( 284 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee(
288 printing::PrintJobWorker* obj) { 285 printing::PrintJobWorker* obj) {
289 DCHECK_EQ(owner_, obj->owner_); 286 DCHECK_EQ(owner_, obj->owner_);
290 owner_ = NULL; 287 owner_ = NULL;
291 } 288 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_job_worker.h ('k') | chrome/browser/printing/print_job_worker_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698