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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/metrics/sparse_histogram.h" 11 #include "base/metrics/sparse_histogram.h"
12 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" 15 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h"
16 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" 16 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h"
17 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h" 17 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h"
18 #include "chrome/browser/chromeos/profiles/profile_helper.h" 18 #include "chrome/browser/chromeos/profiles/profile_helper.h"
19 #include "chrome/browser/lifetime/application_lifetime.h" 19 #include "chrome/browser/lifetime/application_lifetime.h"
20 #include "chrome/common/chrome_content_client.h" 20 #include "chrome/common/chrome_content_client.h"
21 #include "components/policy/core/common/cloud/cloud_external_data_manager.h" 21 #include "components/policy/core/common/cloud/cloud_external_data_manager.h"
22 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h" 22 #include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
23 #include "components/policy/core/common/cloud/device_management_service.h" 23 #include "components/policy/core/common/cloud/device_management_service.h"
24 #include "components/policy/core/common/cloud/system_policy_request_context.h" 24 #include "components/policy/core/common/cloud/system_policy_request_context.h"
25 #include "components/policy/core/common/policy_map.h" 25 #include "components/policy/core/common/policy_map.h"
26 #include "components/policy/core/common/policy_pref_names.h" 26 #include "components/policy/core/common/policy_pref_names.h"
27 #include "components/policy/core/common/policy_types.h" 27 #include "components/policy/core/common/policy_types.h"
28 #include "components/user_manager/user_manager.h"
28 #include "net/url_request/url_request_context_getter.h" 29 #include "net/url_request/url_request_context_getter.h"
29 #include "policy/policy_constants.h" 30 #include "policy/policy_constants.h"
30 #include "url/gurl.h" 31 #include "url/gurl.h"
31 32
32 namespace em = enterprise_management; 33 namespace em = enterprise_management;
33 34
34 namespace policy { 35 namespace policy {
35 36
36 namespace { 37 namespace {
37 38
(...skipping 18 matching lines...) Expand all
56 void OnWildcardCheckCompleted(const std::string& username, 57 void OnWildcardCheckCompleted(const std::string& username,
57 WildcardLoginChecker::Result result) { 58 WildcardLoginChecker::Result result) {
58 if (result == WildcardLoginChecker::RESULT_BLOCKED) { 59 if (result == WildcardLoginChecker::RESULT_BLOCKED) {
59 LOG(ERROR) << "Online wildcard login check failed, terminating session."; 60 LOG(ERROR) << "Online wildcard login check failed, terminating session.";
60 61
61 // TODO(mnissler): This only removes the user pod from the login screen, but 62 // TODO(mnissler): This only removes the user pod from the login screen, but
62 // the cryptohome remains. This is because deleting the cryptohome for a 63 // the cryptohome remains. This is because deleting the cryptohome for a
63 // logged-in session is not possible. Fix this either by delaying the 64 // logged-in session is not possible. Fix this either by delaying the
64 // cryptohome deletion operation or by getting rid of the in-session 65 // cryptohome deletion operation or by getting rid of the in-session
65 // wildcard check. 66 // wildcard check.
66 chromeos::UserManager::Get()->RemoveUserFromList(username); 67 user_manager::UserManager::Get()->RemoveUserFromList(username);
67 chrome::AttemptUserExit(); 68 chrome::AttemptUserExit();
68 } 69 }
69 } 70 }
70 71
71 } // namespace 72 } // namespace
72 73
73 UserCloudPolicyManagerChromeOS::UserCloudPolicyManagerChromeOS( 74 UserCloudPolicyManagerChromeOS::UserCloudPolicyManagerChromeOS(
74 scoped_ptr<CloudPolicyStore> store, 75 scoped_ptr<CloudPolicyStore> store,
75 scoped_ptr<CloudExternalDataManager> external_data_manager, 76 scoped_ptr<CloudExternalDataManager> external_data_manager,
76 const base::FilePath& component_policy_cache_path, 77 const base::FilePath& component_policy_cache_path,
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // OnComponentCloudPolicyUpdated() once it's ready. 389 // OnComponentCloudPolicyUpdated() once it's ready.
389 return; 390 return;
390 } 391 }
391 392
392 core()->StartRefreshScheduler(); 393 core()->StartRefreshScheduler();
393 core()->TrackRefreshDelayPref(local_state_, 394 core()->TrackRefreshDelayPref(local_state_,
394 policy_prefs::kUserPolicyRefreshRate); 395 policy_prefs::kUserPolicyRefreshRate);
395 } 396 }
396 397
397 } // namespace policy 398 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698