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

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

Issue 4165013: Re-landing issue 4202006 (http://codereview.chromium.org/4202006/show) which ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
Index: chrome/service/cloud_print/job_status_updater.h
===================================================================
--- chrome/service/cloud_print/job_status_updater.h (revision 64444)
+++ chrome/service/cloud_print/job_status_updater.h (working copy)
@@ -11,8 +11,8 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/thread.h"
+#include "chrome/service/cloud_print/cloud_print_url_fetcher.h"
#include "chrome/service/cloud_print/print_system.h"
-#include "chrome/common/net/url_fetcher.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_status.h"
@@ -21,7 +21,7 @@
// object releases the reference to itself which should cause it to
// self-destruct.
class JobStatusUpdater : public base::RefCountedThreadSafe<JobStatusUpdater>,
- public URLFetcher::Delegate {
+ public CloudPrintURLFetcherDelegate {
public:
class Delegate {
public:
@@ -45,19 +45,20 @@
void UpdateStatus();
void Stop();
- // URLFetcher::Delegate implementation.
- virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url,
- const URLRequestStatus& status,
- int response_code,
- const ResponseCookies& cookies,
- const std::string& data);
+ // CloudPrintURLFetcher::Delegate implementation.
+ virtual CloudPrintURLFetcher::ResponseAction HandleJSONData(
+ const URLFetcher* source,
+ const GURL& url,
+ DictionaryValue* json_data,
+ bool succeeded);
+ virtual void OnRequestAuthError();
private:
std::string printer_name_;
std::string job_id_;
cloud_print::PlatformJobId local_job_id_;
cloud_print::PrintJobDetails last_job_details_;
- scoped_ptr<URLFetcher> request_;
+ scoped_refptr<CloudPrintURLFetcher> request_;
std::string auth_token_;
GURL cloud_print_server_url_;
scoped_refptr<cloud_print::PrintSystem> print_system_;
« no previous file with comments | « chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc ('k') | chrome/service/cloud_print/job_status_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698