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

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

Issue 11360151: Move common cloud print methods from service/cloud_print to common/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/cloud_print_helpers.h
diff --git a/chrome/service/cloud_print/cloud_print_helpers.h b/chrome/service/cloud_print/cloud_print_helpers.h
index e3bb5b6935625a0c6c2b1ab3175b9c7c710a2013..f07bee3c3549e753047c0e850187058e27b6bcb8 100644
--- a/chrome/service/cloud_print/cloud_print_helpers.h
+++ b/chrome/service/cloud_print/cloud_print_helpers.h
@@ -5,62 +5,38 @@
#ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_
#define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_
-#include <map>
#include <string>
#include <vector>
#include "chrome/service/cloud_print/print_system.h"
#include "googleurl/src/gurl.h"
-namespace base {
-class DictionaryValue;
-}
+namespace cloud_print {
// Helper methods for the cloud print proxy code.
-class CloudPrintHelpers {
- public:
- static GURL GetUrlForPrinterRegistration(const GURL& cloud_print_server_url);
- static GURL GetUrlForPrinterUpdate(const GURL& cloud_print_server_url,
- const std::string& printer_id);
- static GURL GetUrlForPrinterDelete(const GURL& cloud_print_server_url,
- const std::string& printer_id,
- const std::string& reason);
- static GURL GetUrlForPrinterList(const GURL& cloud_print_server_url,
- const std::string& proxy_id);
- static GURL GetUrlForJobFetch(const GURL& cloud_print_server_url,
- const std::string& printer_id,
- const std::string& reason);
- static GURL GetUrlForJobStatusUpdate(const GURL& cloud_print_server_url,
- const std::string& job_id,
- cloud_print::PrintJobStatus status);
- static GURL GetUrlForJobStatusUpdate(
- const GURL& cloud_print_server_url,
- const std::string& job_id,
- const cloud_print::PrintJobDetails& details);
- static GURL GetUrlForUserMessage(const GURL& cloud_print_server_url,
- const std::string& message_id);
- static GURL GetUrlForGetAuthCode(const GURL& cloud_print_server_url,
- const std::string& oauth_client_id,
- const std::string& proxy_id);
+GURL GetUrlForJobStatusUpdate(const GURL& cloud_print_server_url,
+ const std::string& job_id,
+ PrintJobStatus status);
- // Returns an MD5 hash for printer tags.
- static std::string GetHashOfPrinterTags(
- const printing::PrinterBasicInfo& printer);
- // Returns an post data for printer tags.
- static std::string GetPostDataForPrinterTags(
- const printing::PrinterBasicInfo& printer_info,
- const std::string& mime_boundary);
+GURL GetUrlForJobStatusUpdate(const GURL& cloud_print_server_url,
+ const std::string& job_id,
+ const PrintJobDetails& details);
- // Returns true is tags indicate a dry run (test) job.
- static bool IsDryRunJob(const std::vector<std::string>& tags);
+// Returns an MD5 hash for printer tags in the given |printer_info|.
+std::string GetHashOfPrinterInfo(
+ const printing::PrinterBasicInfo& printer_info);
- // Created CloudPrint auth header from the auth token stored in the store.
- static std::string GetCloudPrintAuthHeaderFromStore();
- // Created CloudPrint auth header from the auth token.
- static std::string GetCloudPrintAuthHeader(const std::string& auth_token);
+// Returns an post data for printer tags in the given |printer_info|.
msw 2012/11/29 19:57:36 nit: remove 'an' or correct to 'any'.
Chen Yu 2012/11/30 17:35:46 Done.
+std::string GetPostDataForPrinterInfo(
+ const printing::PrinterBasicInfo& printer_info,
+ const std::string& mime_boundary);
- private:
- CloudPrintHelpers() {}
-};
+// Returns true is tags indicate a dry run (test) job.
msw 2012/11/29 19:57:36 nit: s/is/if/
Chen Yu 2012/11/30 17:35:46 Done.
+bool IsDryRunJob(const std::vector<std::string>& tags);
+
+// Created CloudPrint auth header from the auth token stored in the store.
msw 2012/11/29 19:57:36 nit: "cloud print"
Chen Yu 2012/11/30 17:35:46 Done.
+std::string GetCloudPrintAuthHeaderFromStore();
+
+} // namespace cloud_print
#endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_HELPERS_H_

Powered by Google App Engine
This is Rietveld 408576698