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

Unified Diff: blimp/client/core/blimp_client_context_impl.h

Issue 2204223005: Blimp OAuth2 token retreival on application start up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix. Created 4 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
Index: blimp/client/core/blimp_client_context_impl.h
diff --git a/blimp/client/core/blimp_client_context_impl.h b/blimp/client/core/blimp_client_context_impl.h
index 86c3cc8bee4ccca718081e240a4d305612f7e67f..8243b4016fca073f9ff0701af5cf5406260b32ec 100644
--- a/blimp/client/core/blimp_client_context_impl.h
+++ b/blimp/client/core/blimp_client_context_impl.h
@@ -13,6 +13,7 @@
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "blimp/client/core/session/client_network_components.h"
+#include "blimp/client/core/session/identity_source.h"
#include "blimp/client/core/session/network_event_observer.h"
#include "blimp/client/public/blimp_client_context.h"
#include "blimp/client/public/contents/blimp_contents.h"
@@ -42,7 +43,7 @@ class BlimpClientContextImpl : public BlimpClientContext,
// BlimpClientContext implementation.
void SetDelegate(BlimpClientContextDelegate* delegate) override;
std::unique_ptr<BlimpContents> CreateBlimpContents() override;
- void Connect(const std::string& client_auth_token) override;
+ void Connect() override;
// NetworkEventObserver implementation.
void OnConnected() override;
@@ -54,6 +55,9 @@ class BlimpClientContextImpl : public BlimpClientContext,
virtual GURL GetAssignerURL();
private:
+ // Connect to assignment source with OAuth2 token to get an assignment.
+ virtual void ConnectToAssignmentSource(const std::string& client_auth_token);
+
// The AssignmentCallback for when an assignment is ready. This will trigger
// a connection to the engine.
virtual void ConnectWithAssignment(AssignmentRequestResult result,
@@ -80,6 +84,9 @@ class BlimpClientContextImpl : public BlimpClientContext,
std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
+ // Provide OAuth2 token and propagate account sign in states change.
+ std::unique_ptr<IdentitySource> identity_source_;
+
base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);

Powered by Google App Engine
This is Rietveld 408576698