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

Side by Side Diff: chrome/service/cloud_print/printer_job_handler.h

Issue 10021067: Merge 132283 - Fix a crash if GetPrinterCapsAndDefaults returns after the calling printer is delete… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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 | « no previous file | chrome/service/cloud_print/printer_job_handler.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) 2011 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 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h"
15 #include "base/message_loop_proxy.h" 16 #include "base/message_loop_proxy.h"
16 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
17 #include "base/time.h" 18 #include "base/time.h"
18 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h" 19 #include "chrome/service/cloud_print/cloud_print_url_fetcher.h"
19 #include "chrome/service/cloud_print/job_status_updater.h" 20 #include "chrome/service/cloud_print/job_status_updater.h"
20 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
21 #include "net/url_request/url_request_status.h" 22 #include "net/url_request/url_request_status.h"
22 #include "printing/backend/print_backend.h" 23 #include "printing/backend/print_backend.h"
23 24
24 class URLFetcher; 25 class URLFetcher;
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 bool job_check_pending_; 283 bool job_check_pending_;
283 bool printer_update_pending_; 284 bool printer_update_pending_;
284 285
285 // Some task in the state machine is in progress. 286 // Some task in the state machine is in progress.
286 bool task_in_progress_; 287 bool task_in_progress_;
287 scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_; 288 scoped_refptr<cloud_print::PrintSystem::PrinterWatcher> printer_watcher_;
288 typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList; 289 typedef std::list< scoped_refptr<JobStatusUpdater> > JobStatusUpdaterList;
289 JobStatusUpdaterList job_status_updater_list_; 290 JobStatusUpdaterList job_status_updater_list_;
290 291
291 base::TimeTicks last_job_fetch_time_; 292 base::TimeTicks last_job_fetch_time_;
293 base::WeakPtrFactory<PrinterJobHandler> weak_ptr_factory_;
292 294
293 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler); 295 DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler);
294 }; 296 };
295 297
296 // This typedef is to workaround the issue with certain versions of 298 // This typedef is to workaround the issue with certain versions of
297 // Visual Studio where it gets confused between multiple Delegate 299 // Visual Studio where it gets confused between multiple Delegate
298 // classes and gives a C2500 error. (I saw this error on the try bots - 300 // classes and gives a C2500 error. (I saw this error on the try bots -
299 // the workaround was not needed for my machine). 301 // the workaround was not needed for my machine).
300 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate; 302 typedef PrinterJobHandler::Delegate PrinterJobHandlerDelegate;
301 303
302 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_ 304 #endif // CHROME_SERVICE_CLOUD_PRINT_PRINTER_JOB_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/service/cloud_print/printer_job_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698