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

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

Issue 2204223005: Blimp OAuth2 token retreival on application start up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some deps only for gn deps check script. 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.cc
diff --git a/blimp/client/core/blimp_client_context_impl.cc b/blimp/client/core/blimp_client_context_impl.cc
index 289602adc22ae098e17f0cd8f963513e88c38b07..7852d9cedee834339990b34eec8912291cca0a1c 100644
--- a/blimp/client/core/blimp_client_context_impl.cc
+++ b/blimp/client/core/blimp_client_context_impl.cc
@@ -72,6 +72,19 @@ BlimpClientContextImpl::~BlimpClientContextImpl() {
io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release());
}
+void BlimpClientContextImpl::Connect() {
nyquist 2016/08/12 05:47:04 Nit: You see if it makes sense to order these func
xingliu 2016/08/12 21:11:18 Done.
+ // Lazy initialization of IdentitySource.
+ if (!identity_source_) {
+ DCHECK(delegate_);
+ identity_source_ =
+ base::MakeUnique<IdentitySource>(delegate_->CreateIdentityProvider());
+ identity_source_->SetDelegate(delegate_);
+ }
+
+ // Start Blimp authentication flow.
+ identity_source_->Connect();
+}
+
void BlimpClientContextImpl::SetDelegate(BlimpClientContextDelegate* delegate) {
delegate_ = delegate;
}

Powered by Google App Engine
This is Rietveld 408576698