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

Unified Diff: chrome/service/cloud_print/printer_job_handler.h

Issue 8387011: Chrome proxy refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/job_status_updater.cc ('k') | chrome/service/cloud_print/printer_job_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/printer_job_handler.h
===================================================================
--- chrome/service/cloud_print/printer_job_handler.h (revision 107156)
+++ chrome/service/cloud_print/printer_job_handler.h (working copy)
@@ -33,12 +33,12 @@
// | Have Pending tasks
// |
// |
-// <----Delete Pending -- | ---Update Pending----->
-// | | |
-// | | |
-// | | |
-// Delete Printer from server | Update Printer info on server
-// Shutdown | Go to Stop
+// | ---Update Pending----->
+// | |
+// | |
+// | |
+// | Update Printer info on server
+// | Go to Stop
// |
// | Job Available
// |
@@ -88,14 +88,10 @@
public:
class Delegate {
public:
- virtual void OnPrinterJobHandlerShutdown(
- PrinterJobHandler* job_handler, const std::string& printer_id) = 0;
+ // Notify delegate about authentication error.
virtual void OnAuthError() = 0;
- // Called when the PrinterJobHandler cannot find the printer locally. The
- // delegate returns |delete_from_server| to true if the printer should be
- // deleted from the server,false otherwise.
- virtual void OnPrinterNotFound(const std::string& printer_name,
- bool* delete_from_server) = 0;
+ // Notify delegate that printer has been deleted.
+ virtual void OnPrinterDeleted(const std::string& printer_name) = 0;
protected:
virtual ~Delegate() {}
@@ -115,6 +111,7 @@
Delegate* delegate);
virtual ~PrinterJobHandler();
bool Initialize();
+ std::string GetPrinterName() const;
// Requests a job check. |reason| is the reason for fetching the job. Used
// for logging and diagnostc purposes.
void CheckForJobs(const std::string& reason);
@@ -143,7 +140,8 @@
base::DictionaryValue* json_data,
bool succeeded);
virtual void OnRequestGiveUp();
- virtual void OnRequestAuthError();
+ virtual CloudPrintURLFetcher::ResponseAction OnRequestAuthError();
+ virtual std::string GetAuthHeader();
// JobStatusUpdater::Delegate implementation
virtual bool OnJobCompleted(JobStatusUpdater* updater);
@@ -180,12 +178,6 @@
base::DictionaryValue* json_data,
bool succeeded);
- CloudPrintURLFetcher::ResponseAction HandlePrinterDeleteResponse(
- const content::URLFetcher* source,
- const GURL& url,
- base::DictionaryValue* json_data,
- bool succeeded);
-
CloudPrintURLFetcher::ResponseAction HandleJobMetadataResponse(
const content::URLFetcher* source,
const GURL& url,
@@ -288,7 +280,6 @@
// Flags that specify various pending server updates
bool job_check_pending_;
bool printer_update_pending_;
- bool printer_delete_pending_;
// Some task in the state machine is in progress.
bool task_in_progress_;
« no previous file with comments | « chrome/service/cloud_print/job_status_updater.cc ('k') | chrome/service/cloud_print/printer_job_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698