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

Unified Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.h

Issue 208653010: Use service process to collect printers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/browser/printing/cloud_print/cloud_print_proxy_service.h
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
index 3ccd5c276f83ea58dce865344591ebc7ca7a55d0..7155015a458f550856dd914c5c601b3de4e7e84a 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.h
@@ -33,10 +33,16 @@ class CloudPrintProxyService : public KeyedService {
explicit CloudPrintProxyService(Profile* profile);
virtual ~CloudPrintProxyService();
+ typedef base::Callback<void(const std::vector<std::string>&)>
+ PrintersCallback;
+
// Initializes the object. This should be called every time an object of this
// class is constructed.
void Initialize();
+ // Returns list of printer names available for registration.
+ void GetPrinters(const PrintersCallback& callback);
+
// Enables/disables cloud printing for the user
virtual void EnableForUserWithRobot(
const std::string& robot_auth_code,
@@ -56,16 +62,13 @@ class CloudPrintProxyService : public KeyedService {
std::string proxy_id() const { return proxy_id_; }
- // Returns list of printer names available for registration.
- static void GetPrintersAvalibleForRegistration(
- std::vector<std::string>* printers);
-
private:
// NotificationDelegate implementation for the token expired notification.
class TokenExpiredNotificationDelegate;
friend class TokenExpiredNotificationDelegate;
// Methods that send an IPC to the service.
+ void GetCloudPrintProxyPrinters(const PrintersCallback& callback);
void RefreshCloudPrintProxyStatus();
void EnableCloudPrintProxyWithRobot(
const std::string& robot_auth_code,

Powered by Google App Engine
This is Rietveld 408576698