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

Side by Side Diff: chrome/browser/chromeos/login/auth/login_performer.cc

Issue 378513005: [Athena] Extract Chrome OS authentication stack (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix includes in one more test Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/auth/login_performer.h" 5 #include "chrome/browser/chromeos/login/auth/login_performer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/threading/thread_restrictions.h" 13 #include "base/threading/thread_restrictions.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/chromeos/boot_times_loader.h" 16 #include "chrome/browser/chromeos/boot_times_loader.h"
17 #include "chrome/browser/chromeos/login/login_utils.h" 17 #include "chrome/browser/chromeos/login/login_utils.h"
18 #include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h " 18 #include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h "
19 #include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h " 19 #include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h "
20 #include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h" 20 #include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h"
21 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 21 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
22 #include "chrome/browser/chromeos/login/users/user_manager.h" 22 #include "chrome/browser/chromeos/login/users/user_manager.h"
23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
24 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" 24 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
25 #include "chrome/browser/chromeos/profiles/profile_helper.h" 25 #include "chrome/browser/chromeos/profiles/profile_helper.h"
26 #include "chrome/browser/chromeos/settings/cros_settings.h" 26 #include "chrome/browser/chromeos/settings/cros_settings.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chromeos/dbus/dbus_thread_manager.h" 28 #include "chromeos/dbus/dbus_thread_manager.h"
29 #include "chromeos/dbus/session_manager_client.h" 29 #include "chromeos/dbus/session_manager_client.h"
30 #include "chromeos/login/user_names.h"
30 #include "chromeos/settings/cros_settings_names.h" 31 #include "chromeos/settings/cros_settings_names.h"
31 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
32 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
33 #include "content/public/browser/notification_types.h" 34 #include "content/public/browser/notification_types.h"
34 #include "content/public/browser/user_metrics.h" 35 #include "content/public/browser/user_metrics.h"
35 #include "google_apis/gaia/gaia_auth_util.h" 36 #include "google_apis/gaia/gaia_auth_util.h"
36 #include "grit/generated_resources.h" 37 #include "grit/generated_resources.h"
37 #include "net/cookies/cookie_monster.h" 38 #include "net/cookies/cookie_monster.h"
38 #include "net/cookies/cookie_store.h" 39 #include "net/cookies/cookie_store.h"
39 #include "net/url_request/url_request_context.h" 40 #include "net/url_request/url_request_context.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } else { 193 } else {
193 if (delegate_) 194 if (delegate_)
194 delegate_->WhiteListCheckFailed(user_context.GetUserID()); 195 delegate_->WhiteListCheckFailed(user_context.GetUserID());
195 else 196 else
196 NOTREACHED(); 197 NOTREACHED();
197 } 198 }
198 } 199 }
199 200
200 void LoginPerformer::LoginAsLocallyManagedUser( 201 void LoginPerformer::LoginAsLocallyManagedUser(
201 const UserContext& user_context) { 202 const UserContext& user_context) {
202 DCHECK_EQ(UserManager::kLocallyManagedUserDomain, 203 DCHECK_EQ(chromeos::login::kLocallyManagedUserDomain,
203 gaia::ExtractDomainName(user_context.GetUserID())); 204 gaia::ExtractDomainName(user_context.GetUserID()));
204 205
205 CrosSettings* cros_settings = CrosSettings::Get(); 206 CrosSettings* cros_settings = CrosSettings::Get();
206 CrosSettingsProvider::TrustedStatus status = 207 CrosSettingsProvider::TrustedStatus status =
207 cros_settings->PrepareTrustedValues( 208 cros_settings->PrepareTrustedValues(
208 base::Bind(&LoginPerformer::LoginAsLocallyManagedUser, 209 base::Bind(&LoginPerformer::LoginAsLocallyManagedUser,
209 weak_factory_.GetWeakPtr(), 210 weak_factory_.GetWeakPtr(),
210 user_context_)); 211 user_context_));
211 // Must not proceed without signature verification. 212 // Must not proceed without signature verification.
212 if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) { 213 if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 policy::WildcardLoginChecker::Result result) { 363 policy::WildcardLoginChecker::Result result) {
363 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) { 364 if (result == policy::WildcardLoginChecker::RESULT_ALLOWED) {
364 StartLoginCompletion(); 365 StartLoginCompletion();
365 } else { 366 } else {
366 if (delegate_) 367 if (delegate_)
367 delegate_->WhiteListCheckFailed(user_context_.GetUserID()); 368 delegate_->WhiteListCheckFailed(user_context_.GetUserID());
368 } 369 }
369 } 370 }
370 371
371 } // namespace chromeos 372 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/auth/login_performer.h ('k') | chrome/browser/chromeos/login/auth/mock_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698