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

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

Issue 1900033005: Simplify some CloudPrintProxy code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 8 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/cloud_print_proxy_backend.h
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.h b/chrome/service/cloud_print/cloud_print_proxy_backend.h
index 7a9aa668745c6ca2e80344ac42da136c228b7a57..37684b953625e2df7508445a8f121f427c93d353 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.h
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.h
@@ -50,16 +50,14 @@ class CloudPrintProxyFrontend {
protected:
// Don't delete through SyncFrontend interface.
- virtual ~CloudPrintProxyFrontend() {
- }
+ virtual ~CloudPrintProxyFrontend() {}
+
private:
DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyFrontend);
};
class CloudPrintProxyBackend {
public:
- // It is OK for print_system_settings to be NULL. In this case system should
- // use system default settings.
CloudPrintProxyBackend(CloudPrintProxyFrontend* frontend,
const ConnectorSettings& settings,
const gaia::OAuthClientInfo& oauth_client_info,
@@ -80,19 +78,26 @@ class CloudPrintProxyBackend {
void UnregisterPrinters();
private:
+ bool PostCoreTask(const tracked_objects::Location& from_here,
+ const base::Closure& task);
+
// The real guts of SyncBackendHost, to keep the public client API clean.
class Core;
- // A thread we dedicate for use to perform initialization and
- // authentication.
+
+ // A thread dedicated for use to perform initialization and authentication.
base::Thread core_thread_;
- // Our core, which communicates with AuthWatcher for GAIA authentication and
+
+ // The core, which communicates with AuthWatcher for GAIA authentication and
// which contains printer registration code.
scoped_refptr<Core> core_;
+
// A reference to the MessageLoop used to construct |this|, so we know how
// to safely talk back to the SyncFrontend.
base::MessageLoop* const frontend_loop_;
- // The frontend which is responsible for displaying UI and updating Prefs
- CloudPrintProxyFrontend* frontend_;
+
+ // The frontend which is responsible for displaying UI and updating Prefs.
+ // Outlives this backend.
+ CloudPrintProxyFrontend* const frontend_;
friend class base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>;
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/cloud_print/cloud_print_proxy_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698