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

Unified Diff: chrome/browser/chromeos/login/users/affiliation.cc

Issue 2545523003: As YAPS server does not handle affiliation_ids correctly yet, we need to have a flag that would al… (Closed)
Patch Set: Added comments Created 4 years 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 | « no previous file | components/policy/core/common/policy_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/users/affiliation.cc
diff --git a/chrome/browser/chromeos/login/users/affiliation.cc b/chrome/browser/chromeos/login/users/affiliation.cc
index 4330afcce50385b6e8af909ace5b4fa60eb4a01d..6d9b38d8f7d901bb754e44c55dccdb6e429f68bb 100644
--- a/chrome/browser/chromeos/login/users/affiliation.cc
+++ b/chrome/browser/chromeos/login/users/affiliation.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/chromeos/login/users/affiliation.h"
+#include "base/command_line.h"
#include "chrome/browser/chromeos/policy/device_local_account.h"
+#include "components/policy/core/common/policy_switches.h"
#include "google_apis/gaia/gaia_auth_util.h"
namespace chromeos {
@@ -40,6 +42,14 @@ bool IsUserAffiliated(const AffiliationIDSet& user_affiliation_ids,
return true;
}
+ // Not all test servers correctly support affiliation ids so far, so
+ // this is a work-around.
+ // TODO(antrim): remove this once all test servers support affiliation ids.
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(policy::switches::kUserAlwaysAffiliated)) {
+ return true;
+ }
+
if (!device_affiliation_ids.empty() && !user_affiliation_ids.empty()) {
return HaveCommonElement(user_affiliation_ids, device_affiliation_ids);
}
« no previous file with comments | « no previous file | components/policy/core/common/policy_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698