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

Unified Diff: chrome/browser/chrome_to_mobile_service.h

Issue 10828353: Chrome To Mobile Service refactoring and polish, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bf608c0aa13844eeabcf8d3ca248ea5b31c1fda8..3613396d7f4647fd995eb3cbdb28bbabf3c8ef79 100644
--- a/chrome/browser/chrome_to_mobile_service.h
+++ b/chrome/browser/chrome_to_mobile_service.h
@@ -11,7 +11,6 @@
#include <vector>
#include "base/file_path.h"
-#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/string16.h"
#include "base/timer.h"
@@ -105,7 +104,7 @@ class ChromeToMobileService : public ProfileKeyedService,
virtual ~ChromeToMobileService();
// Returns true if the service has found any registered mobile devices.
- bool HasMobiles();
+ bool HasMobiles() const;
// Get the non-NULL ListValue of mobile devices from the cloud print service.
// The list is owned by PrefService, which outlives ChromeToMobileService.
@@ -156,6 +155,10 @@ class ChromeToMobileService : public ProfileKeyedService,
private:
friend class MockChromeToMobileService;
+ // Enable or disable Chrome To Mobile with the browsers' command controllers.
+ // The feature state is automatically derived from internal conditions.
+ void UpdateCommandState() const;
+
// Handle the attempted creation of a temporary file for snapshot generation.
// Alert the observer of failure or generate MHTML with an observer callback.
void SnapshotFileCreated(base::WeakPtr<Observer> observer,
@@ -166,7 +169,7 @@ class ChromeToMobileService : public ProfileKeyedService,
// Create a cloud print job submission request for a URL or snapshot.
net::URLFetcher* CreateRequest(const JobData& data);
- // Initialize URLFetcher requests (search and jobs submit).
+ // Initialize cloud print URLFetcher requests.
void InitRequest(net::URLFetcher* request);
// Submit a cloud print job request with the requisite data.
@@ -174,13 +177,13 @@ class ChromeToMobileService : public ProfileKeyedService,
// Send the OAuth2AccessTokenFetcher request.
// Virtual for unit test mocking.
- virtual void RefreshAccessToken();
+ virtual void RequestAccessToken();
// Request account information to limit cloud print access to existing users.
void RequestAccountInfo();
- // Send the cloud print URLFetcher search request.
- void RequestSearch();
+ // Send the cloud print URLFetcher device search request.
+ void RequestDeviceSearch();
void HandleAccountInfoResponse();
void HandleSearchResponse();
« no previous file with comments | « no previous file | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698