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

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: Fix build config. 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 e108782858c9b464d5829ef7c3cc4413b5ab8a4a..c5ea551ff9f1682e4d5b13f923ca989a2c9b18a5 100644
--- a/blimp/client/core/blimp_client_context_impl.h
+++ b/blimp/client/core/blimp_client_context_impl.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
+#include "blimp/client/core/authenticator.h"
#include "blimp/client/core/session/client_network_components.h"
#include "blimp/client/core/session/network_event_observer.h"
#include "blimp/client/public/blimp_client_context.h"
@@ -31,11 +32,17 @@ class BlimpClientContextImpl : public BlimpClientContext,
// operations.
explicit BlimpClientContextImpl(
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner);
+
~BlimpClientContextImpl() override;
+ // Start authentication flow.
+ virtual void Connect();
nyquist 2016/08/10 01:20:33 It kind of feels like this should be part of the p
xingliu 2016/08/10 21:03:15 Oh, this is my bad. Moved to public interface.
+
// BlimpClientContext implementation.
void SetDelegate(BlimpClientContextDelegate* delegate) override;
std::unique_ptr<BlimpContents> CreateBlimpContents() override;
+ void CreateAuthenticator(
+ std::unique_ptr<IdentityProvider> identity_provider) override;
// NetworkEventObserver implementation.
void OnConnected() override;
@@ -58,6 +65,8 @@ class BlimpClientContextImpl : public BlimpClientContext,
std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
+ std::unique_ptr<Authenticator> authenticator_;
+
base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);

Powered by Google App Engine
This is Rietveld 408576698