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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2508713003: arc: Prepare ArcAuthEndpoint flag for finch experiment. (Closed)
Patch Set: fix rebase glitch Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 4e3bf5146c59e131b17f79e7064eb41c1716cecb..3fc09a0d3bcca8e06c33b8a5e09e547e4e11436e 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chromeos/chromeos_switches.h"
#include "components/arc/arc_bridge_service.h"
+#include "components/arc/arc_features.h"
#include "content/public/browser/browser_thread.h"
namespace arc {
@@ -224,20 +225,12 @@ void ArcAuthService::RequestAccountInfoInternal(
return;
}
- // If endpoint is passed via command line flag, use automatic auth code
- // fetching.
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- std::string auth_endpoint;
- if (command_line->HasSwitch(chromeos::switches::kArcUseAuthEndpoint)) {
- auth_endpoint = command_line->GetSwitchValueASCII(
- chromeos::switches::kArcUseAuthEndpoint);
- }
- if (!auth_endpoint.empty()) {
+ // Optionally retrive auth code in silent mode.
+ if (base::FeatureList::IsEnabled(arc::kArcUseAuthEndpointFeature)) {
DCHECK(!auth_code_fetcher_);
auth_code_fetcher_ = base::MakeUnique<ArcAuthCodeFetcher>(
ArcSessionManager::Get()->profile(),
- ArcSessionManager::Get()->auth_context(), auth_endpoint);
+ ArcSessionManager::Get()->auth_context());
auth_code_fetcher_->Fetch(base::Bind(&ArcAuthService::OnAuthCodeFetched,
weak_ptr_factory_.GetWeakPtr()));
return;
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_code_fetcher.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698