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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 1922143002: Disabled ARC for ephemeral users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 Shutdown(); 223 Shutdown();
224 224
225 user_manager::User const* const user = 225 user_manager::User const* const user =
226 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 226 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
227 if (profile->IsLegacySupervised() || !user->HasGaiaAccount()) { 227 if (profile->IsLegacySupervised() || !user->HasGaiaAccount()) {
228 VLOG(2) << "Supervised users and users without GAIA accounts are not " 228 VLOG(2) << "Supervised users and users without GAIA accounts are not "
229 "supported in Arc."; 229 "supported in Arc.";
230 return; 230 return;
231 } 231 }
232 232
233 if (user_manager::UserManager::Get()
234 ->IsCurrentUserCryptohomeDataEphemeral()) {
235 VLOG(2) << "Users with ephemeral data are not supported in Arc.";
236 return;
237 }
238
233 profile_ = profile; 239 profile_ = profile;
234 PrefServiceSyncableFromProfile(profile_)->AddSyncedPrefObserver( 240 PrefServiceSyncableFromProfile(profile_)->AddSyncedPrefObserver(
235 prefs::kArcEnabled, this); 241 prefs::kArcEnabled, this);
236 242
237 // Reuse storage used in ARC OptIn platform app. 243 // Reuse storage used in ARC OptIn platform app.
238 const std::string site_url = 244 const std::string site_url =
239 base::StringPrintf("%s://%s/persist?%s", content::kGuestScheme, 245 base::StringPrintf("%s://%s/persist?%s", content::kGuestScheme,
240 kArcSupportExtensionId, kArcSupportStorageId); 246 kArcSupportExtensionId, kArcSupportStorageId);
241 storage_partition_ = content::BrowserContext::GetStoragePartitionForSite( 247 storage_partition_ = content::BrowserContext::GetStoragePartitionForSite(
242 profile_, GURL(site_url)); 248 profile_, GURL(site_url));
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return os << kStateFetchingCode; 541 return os << kStateFetchingCode;
536 case ArcAuthService::State::ACTIVE: 542 case ArcAuthService::State::ACTIVE:
537 return os << kStateActive; 543 return os << kStateActive;
538 default: 544 default:
539 NOTREACHED(); 545 NOTREACHED();
540 return os; 546 return os;
541 } 547 }
542 } 548 }
543 549
544 } // namespace arc 550 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698