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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2452983002: ChromeOS: This CL moves chromeos/login/user_names* to user_mananger. (Closed)
Patch Set: Removed unused #includes 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 unified diff | Download patch
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/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "chrome/common/logging_chrome.h" 84 #include "chrome/common/logging_chrome.h"
85 #include "chrome/common/pref_names.h" 85 #include "chrome/common/pref_names.h"
86 #include "chromeos/cert_loader.h" 86 #include "chromeos/cert_loader.h"
87 #include "chromeos/chromeos_switches.h" 87 #include "chromeos/chromeos_switches.h"
88 #include "chromeos/cryptohome/cryptohome_parameters.h" 88 #include "chromeos/cryptohome/cryptohome_parameters.h"
89 #include "chromeos/cryptohome/cryptohome_util.h" 89 #include "chromeos/cryptohome/cryptohome_util.h"
90 #include "chromeos/dbus/cryptohome_client.h" 90 #include "chromeos/dbus/cryptohome_client.h"
91 #include "chromeos/dbus/dbus_thread_manager.h" 91 #include "chromeos/dbus/dbus_thread_manager.h"
92 #include "chromeos/dbus/session_manager_client.h" 92 #include "chromeos/dbus/session_manager_client.h"
93 #include "chromeos/login/auth/stub_authenticator.h" 93 #include "chromeos/login/auth/stub_authenticator.h"
94 #include "chromeos/login/user_names.h"
95 #include "chromeos/network/portal_detector/network_portal_detector.h" 94 #include "chromeos/network/portal_detector/network_portal_detector.h"
96 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" 95 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
97 #include "chromeos/settings/cros_settings_names.h" 96 #include "chromeos/settings/cros_settings_names.h"
98 #include "components/arc/arc_bridge_service.h" 97 #include "components/arc/arc_bridge_service.h"
99 #include "components/arc/arc_service_manager.h" 98 #include "components/arc/arc_service_manager.h"
100 #include "components/component_updater/component_updater_service.h" 99 #include "components/component_updater/component_updater_service.h"
101 #include "components/flags_ui/pref_service_flags_storage.h" 100 #include "components/flags_ui/pref_service_flags_storage.h"
102 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 101 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
103 #include "components/prefs/pref_member.h" 102 #include "components/prefs/pref_member.h"
104 #include "components/prefs/pref_registry_simple.h" 103 #include "components/prefs/pref_registry_simple.h"
105 #include "components/prefs/pref_service.h" 104 #include "components/prefs/pref_service.h"
106 #include "components/quirks/quirks_manager.h" 105 #include "components/quirks/quirks_manager.h"
107 #include "components/session_manager/core/session_manager.h" 106 #include "components/session_manager/core/session_manager.h"
108 #include "components/signin/core/account_id/account_id.h" 107 #include "components/signin/core/account_id/account_id.h"
109 #include "components/signin/core/browser/account_tracker_service.h" 108 #include "components/signin/core/browser/account_tracker_service.h"
110 #include "components/signin/core/browser/signin_manager_base.h" 109 #include "components/signin/core/browser/signin_manager_base.h"
111 #include "components/user_manager/known_user.h" 110 #include "components/user_manager/known_user.h"
112 #include "components/user_manager/user.h" 111 #include "components/user_manager/user.h"
113 #include "components/user_manager/user_manager.h" 112 #include "components/user_manager/user_manager.h"
113 #include "components/user_manager/user_names.h"
114 #include "components/user_manager/user_type.h" 114 #include "components/user_manager/user_type.h"
115 #include "content/public/browser/browser_thread.h" 115 #include "content/public/browser/browser_thread.h"
116 #include "content/public/browser/notification_service.h" 116 #include "content/public/browser/notification_service.h"
117 #include "content/public/browser/storage_partition.h" 117 #include "content/public/browser/storage_partition.h"
118 #include "content/public/common/content_switches.h" 118 #include "content/public/common/content_switches.h"
119 #include "net/cert/sth_distributor.h" 119 #include "net/cert/sth_distributor.h"
120 #include "ui/base/ime/chromeos/input_method_descriptor.h" 120 #include "ui/base/ime/chromeos/input_method_descriptor.h"
121 #include "ui/base/ime/chromeos/input_method_manager.h" 121 #include "ui/base/ime/chromeos/input_method_manager.h"
122 #include "url/gurl.h" 122 #include "url/gurl.h"
123 123
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // This makes sure that Chrome restarts with no per-session flags. The guest 435 // This makes sure that Chrome restarts with no per-session flags. The guest
436 // profile will always have empty set of per-session flags. If this is not 436 // profile will always have empty set of per-session flags. If this is not
437 // done and device owner has some per-session flags, when Chrome is relaunched 437 // done and device owner has some per-session flags, when Chrome is relaunched
438 // the guest profile session flags will not match the current command line and 438 // the guest profile session flags will not match the current command line and
439 // another restart will be attempted in order to reset the user flags for the 439 // another restart will be attempted in order to reset the user flags for the
440 // guest user. 440 // guest user.
441 const base::CommandLine user_flags(base::CommandLine::NO_PROGRAM); 441 const base::CommandLine user_flags(base::CommandLine::NO_PROGRAM);
442 if (!about_flags::AreSwitchesIdenticalToCurrentCommandLine( 442 if (!about_flags::AreSwitchesIdenticalToCurrentCommandLine(
443 user_flags, *base::CommandLine::ForCurrentProcess(), NULL)) { 443 user_flags, *base::CommandLine::ForCurrentProcess(), NULL)) {
444 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser( 444 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
445 cryptohome::Identification(login::GuestAccountId()), 445 cryptohome::Identification(user_manager::GuestAccountId()),
446 base::CommandLine::StringVector()); 446 base::CommandLine::StringVector());
447 } 447 }
448 448
449 RestartChrome(command_line); 449 RestartChrome(command_line);
450 } 450 }
451 451
452 scoped_refptr<Authenticator> UserSessionManager::CreateAuthenticator( 452 scoped_refptr<Authenticator> UserSessionManager::CreateAuthenticator(
453 AuthStatusConsumer* consumer) { 453 AuthStatusConsumer* consumer) {
454 // Screen locker needs new Authenticator instance each time. 454 // Screen locker needs new Authenticator instance each time.
455 if (ScreenLocker::default_screen_locker()) { 455 if (ScreenLocker::default_screen_locker()) {
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 ->browser_policy_connector_chromeos() 1880 ->browser_policy_connector_chromeos()
1881 ->IsEnterpriseManaged()) { 1881 ->IsEnterpriseManaged()) {
1882 return false; 1882 return false;
1883 } 1883 }
1884 1884
1885 // Do not show end of life notification if this is a guest session 1885 // Do not show end of life notification if this is a guest session
1886 return !profile->IsGuestSession(); 1886 return !profile->IsGuestSession();
1887 } 1887 }
1888 1888
1889 } // namespace chromeos 1889 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698