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

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

Issue 2406403003: Clean up Assignment Create in BlimpClientContextImpl. (Closed)
Patch Set: Minor comment change. Created 4 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
Index: blimp/client/core/context/blimp_client_context_impl.h
diff --git a/blimp/client/core/context/blimp_client_context_impl.h b/blimp/client/core/context/blimp_client_context_impl.h
index d6e46c0e57495f712e089794e19cbd4a49f48304..751ec13d4e6b5d5fef252c1c82678ce09bc71981 100644
--- a/blimp/client/core/context/blimp_client_context_impl.h
+++ b/blimp/client/core/context/blimp_client_context_impl.h
@@ -15,9 +15,9 @@
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
+#include "blimp/client/core/context/assignment_fetcher.h"
#include "blimp/client/core/session/client_network_components.h"
#include "blimp/client/core/session/connection_status.h"
-#include "blimp/client/core/session/identity_source.h"
#include "blimp/client/core/settings/blimp_settings_delegate.h"
#include "blimp/client/public/blimp_client_context.h"
#include "blimp/client/public/contents/blimp_contents.h"
@@ -67,19 +67,11 @@ class BlimpClientContextImpl
std::unordered_map<std::string, std::string> CreateFeedbackData();
protected:
- // Returns the URL to use for connections to the assigner. Used to construct
- // the AssignmentSource.
- virtual GURL GetAssignerURL();
-
// BlimpSettingsDelegate implementation.
IdentitySource* GetIdentitySource() override;
ConnectionStatus* GetConnectionStatus() override;
private:
- // Called when an OAuth2 token is received. Will then ask the
- // AssignmentSource for an Assignment with this token.
- virtual void OnAuthTokenReceived(const std::string& client_auth_token);
-
// Called when the AssignmentSource is finished getting an Assignment. Will
// then call |ConnectWithAssignment| to initiate the actual connection.
virtual void OnAssignmentReceived(AssignmentRequestResult result,
@@ -92,10 +84,6 @@ class BlimpClientContextImpl
// May be called on any thread.
void DropConnection();
- // Create IdentitySource which provides user sign in states and OAuth2 token
- // service.
- void CreateIdentitySource();
-
// BlobImageSerializationProcessor::ErrorDelegate implementation.
void OnImageDecodeError() override;
@@ -108,10 +96,6 @@ class BlimpClientContextImpl
// The task runner to use for file operations.
scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_;
- // The AssignmentSource is used when the user of BlimpClientContextImpl calls
- // Connect() to get a valid assignment and later connect to the engine.
- std::unique_ptr<AssignmentSource> assignment_source_;
-
// A set of dependencies required by all BlimpCompositor instances.
std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_;
@@ -132,8 +116,7 @@ class BlimpClientContextImpl
std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
- // Provide OAuth2 token and propagate account sign in states change.
- std::unique_ptr<IdentitySource> identity_source_;
+ std::unique_ptr<AssignmentFetcher> assignment_fetcher_;
// Connection status to the engine.
ConnectionStatus connection_status_;

Powered by Google App Engine
This is Rietveld 408576698