Index: chrome/browser/chrome_to_mobile_service.h |
diff --git a/chrome/browser/chrome_to_mobile_service.h b/chrome/browser/chrome_to_mobile_service.h |
index fbe6c6b8ac9a661c09a8fee896a9b0a41181cfe0..5660fda581779643ffcfbdd687eb0e406e2a563e 100644 |
--- a/chrome/browser/chrome_to_mobile_service.h |
+++ b/chrome/browser/chrome_to_mobile_service.h |
@@ -28,6 +28,7 @@ class OAuth2AccessTokenFetcher; |
class Browser; |
class CloudPrintURL; |
class MockChromeToMobileService; |
+class PrefService; |
class Profile; |
namespace net { |
@@ -97,14 +98,19 @@ class ChromeToMobileService : public ProfileKeyedService, |
// 'enable' command line switches, otherwise relay the default enabled state. |
static bool IsChromeToMobileEnabled(); |
+ // Register the user prefs associated with this service. |
+ static void RegisterUserPrefs(PrefService* prefs); |
+ |
explicit ChromeToMobileService(Profile* profile); |
virtual ~ChromeToMobileService(); |
// Returns true if the service has found any registered mobile devices. |
- bool HasDevices(); |
+ bool HasMobiles(); |
- // Get the list of mobile devices, a ListValue of DictionaryValues. |
- const base::ListValue& mobiles() const { return mobiles_; } |
+ // Get the non-NULL ListValue of mobile devices from the cloud print service. |
+ // Each device DictionaryValue contains strings "type", "name", and "id". |
+ // Virtual for unit test mocking. |
+ virtual const base::ListValue* GetMobiles() const; |
sky
2012/07/23 21:25:45
Document ownership and lifetime.
msw
2012/07/23 21:43:43
Done.
|
// Request an updated mobile device list, request auth first if needed. |
// Virtual for unit test mocking. |
@@ -190,10 +196,6 @@ class ChromeToMobileService : public ProfileKeyedService, |
scoped_ptr<CloudPrintURL> cloud_print_url_; |
std::string access_token_; |
- // The list of mobile devices retrieved from the cloud print service. |
- // Each mobile DictionaryValue contains strings "type", "name", and "id". |
- base::ListValue mobiles_; |
- |
// The set of snapshots currently available. |
std::set<FilePath> snapshots_; |
@@ -210,9 +212,8 @@ class ChromeToMobileService : public ProfileKeyedService, |
scoped_ptr<net::URLFetcher> account_info_request_; |
bool cloud_print_accessible_; |
- // The pending mobile device search request; and the time of the last request. |
+ // The pending mobile device search request. |
scoped_ptr<net::URLFetcher> search_request_; |
- base::TimeTicks previous_search_time_; |
DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); |
}; |