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

Unified Diff: components/copresence/copresence_manager_impl.h

Issue 684273004: Moving the DirectiveHandler to be owned by CopresenceManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing crash Created 6 years, 2 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 | components/copresence/copresence_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/copresence_manager_impl.h
diff --git a/components/copresence/copresence_manager_impl.h b/components/copresence/copresence_manager_impl.h
index 2d874ae5674f37b520fc86f449a3ca9738c1dc5a..ffe690322b62628e1e898dbf512d6149e8006545 100644
--- a/components/copresence/copresence_manager_impl.h
+++ b/components/copresence/copresence_manager_impl.h
@@ -6,14 +6,11 @@
#define COMPONENTS_COPRESENCE_COPRESENCE_MANAGER_IMPL_H_
#include <string>
-#include <vector>
-#include "base/callback.h"
#include "base/cancelable_callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
-#include "components/copresence/proto/rpcs.pb.h"
#include "components/copresence/public/copresence_manager.h"
namespace net {
@@ -22,6 +19,8 @@ class URLContextGetter;
namespace copresence {
+class DirectiveHandler;
+class ReportRequest;
class RpcHandler;
struct PendingRequest {
@@ -55,18 +54,17 @@ class CopresenceManagerImpl : public CopresenceManager {
void CompleteInitialization();
void InitStepComplete(const std::string& step, bool success);
- bool init_failed_;
- ScopedVector<PendingRequest> pending_requests_queue_;
+ // Belongs to the caller.
+ CopresenceDelegate* const delegate_;
+ int pending_init_operations_;
base::CancelableCallback<void(bool)> whispernet_init_callback_;
+ bool init_failed_;
- // TODO(rkc): This code is almost identical to what we use in feedback to
- // perform multiple blocking tasks and then run a post process method. Look
- // into refactoring it all out to a common construct, like maybe a
- // PostMultipleTasksAndReply?
- int pending_init_operations_;
+ ScopedVector<PendingRequest> pending_requests_queue_;
- CopresenceDelegate* const delegate_;
+ // The RpcHandler depends on the directive handler.
+ scoped_ptr<DirectiveHandler> directive_handler_;
scoped_ptr<RpcHandler> rpc_handler_;
DISALLOW_COPY_AND_ASSIGN(CopresenceManagerImpl);
« no previous file with comments | « no previous file | components/copresence/copresence_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698