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

Unified Diff: blimp/client/core/context/assignment_fetcher.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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/assignment_fetcher.cc
diff --git a/blimp/client/core/context/assignment_fetcher.cc b/blimp/client/core/context/assignment_fetcher.cc
deleted file mode 100644
index e51c6fc34354ca5a69390adaea536afe3406f367..0000000000000000000000000000000000000000
--- a/blimp/client/core/context/assignment_fetcher.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/client/core/context/assignment_fetcher.h"
-
-#include <string>
-#include <utility>
-
-#include "base/bind.h"
-#include "base/memory/ptr_util.h"
-#include "blimp/client/core/session/assignment_source.h"
-#include "blimp/client/core/session/identity_source.h"
-
-namespace blimp {
-namespace client {
-
-AssignmentFetcher::AssignmentFetcher(
- scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
- std::unique_ptr<IdentityProvider> identity_provider,
- GURL assigner_url,
- const AssignmentResultCallback& assignment_received_callback,
- const AuthErrorCallback& error_callback)
- : identity_source_(base::MakeUnique<IdentitySource>(
- std::move(identity_provider),
- error_callback,
- base::Bind(&AssignmentFetcher::OnAuthTokenReceived,
- base::Unretained(this)))),
- assignment_received_callback_(assignment_received_callback),
- assigner_url_(assigner_url),
- io_thread_task_runner_(io_thread_task_runner),
- file_thread_task_runner_(file_thread_task_runner) {}
-
-AssignmentFetcher::~AssignmentFetcher() = default;
-
-void AssignmentFetcher::Fetch() {
- // Start Blimp authentication flow. The OAuth2 token will be used in
- // assignment source.
- identity_source_->Connect();
-}
-
-IdentitySource* AssignmentFetcher::GetIdentitySource() {
- return identity_source_.get();
-}
-
-void AssignmentFetcher::OnAuthTokenReceived(
- const std::string& client_auth_token) {
- if (!assignment_source_) {
- assignment_source_.reset(new AssignmentSource(
- assigner_url_, io_thread_task_runner_, file_thread_task_runner_));
- }
-
- VLOG(1) << "Trying to get assignment.";
- assignment_source_->GetAssignment(client_auth_token,
- assignment_received_callback_);
-}
-
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/core/context/assignment_fetcher.h ('k') | blimp/client/core/context/blimp_client_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698