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

Unified Diff: chrome/browser/printing/print_job.h

Issue 10383254: At browser exit, wait for pending print jobs before starting shutdown. This is to avoid a nested me… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job.h
===================================================================
--- chrome/browser/printing/print_job.h (revision 137865)
+++ chrome/browser/printing/print_job.h (working copy)
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/message_loop.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "content/public/browser/notification_observer.h"
@@ -108,6 +109,9 @@
// eventual deadlock.
void ControlledWorkerShutdown();
+ // Called at shutdown when running a nested message loop.
+ void Quit();
+
content::NotificationRegistrar registrar_;
// Main message loop reference. Used to send notifications in the right
@@ -136,6 +140,9 @@
// the notified calls Cancel() again.
bool is_canceling_;
+ // Used at shutdown so that we can quit a nested message loop.
+ base::WeakPtrFactory<PrintJob> quit_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PrintJob);
};
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698