OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/chromeos/login/ownership_service.h" | 34 #include "chrome/browser/chromeos/login/ownership_service.h" |
35 #include "chrome/browser/chromeos/login/parallel_authenticator.h" | 35 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
36 #include "chrome/browser/chromeos/login/screen_locker.h" | 36 #include "chrome/browser/chromeos/login/screen_locker.h" |
37 #include "chrome/browser/chromeos/login/user_manager.h" | 37 #include "chrome/browser/chromeos/login/user_manager.h" |
38 #include "chrome/browser/extensions/extension_service.h" | 38 #include "chrome/browser/extensions/extension_service.h" |
39 #include "chrome/browser/net/chrome_url_request_context.h" | 39 #include "chrome/browser/net/chrome_url_request_context.h" |
40 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" | 40 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" |
41 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h" | 41 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h" |
42 #include "chrome/browser/net/gaia/token_service.h" | 42 #include "chrome/browser/net/gaia/token_service.h" |
43 #include "chrome/browser/net/preconnect.h" | 43 #include "chrome/browser/net/preconnect.h" |
| 44 #include "chrome/browser/plugin_updater.h" |
44 #include "chrome/browser/policy/browser_policy_connector.h" | 45 #include "chrome/browser/policy/browser_policy_connector.h" |
45 #include "chrome/browser/prefs/pref_member.h" | 46 #include "chrome/browser/prefs/pref_member.h" |
46 #include "chrome/browser/profiles/profile.h" | 47 #include "chrome/browser/profiles/profile.h" |
47 #include "chrome/browser/profiles/profile_manager.h" | 48 #include "chrome/browser/profiles/profile_manager.h" |
48 #include "chrome/browser/sync/profile_sync_service.h" | 49 #include "chrome/browser/sync/profile_sync_service.h" |
49 #include "chrome/browser/ui/browser_init.h" | 50 #include "chrome/browser/ui/browser_init.h" |
50 #include "chrome/common/chrome_paths.h" | 51 #include "chrome/common/chrome_paths.h" |
51 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
52 #include "chrome/common/logging_chrome.h" | 53 #include "chrome/common/logging_chrome.h" |
53 #include "chrome/common/net/gaia/gaia_constants.h" | 54 #include "chrome/common/net/gaia/gaia_constants.h" |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { | 541 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { |
541 if (cryptohome->TpmIsOwned()) { | 542 if (cryptohome->TpmIsOwned()) { |
542 cryptohome->TpmClearStoredPassword(); | 543 cryptohome->TpmClearStoredPassword(); |
543 } else { | 544 } else { |
544 cryptohome->TpmCanAttemptOwnership(); | 545 cryptohome->TpmCanAttemptOwnership(); |
545 } | 546 } |
546 } | 547 } |
547 btl->AddLoginTimeMarker("TPMOwn-End", false); | 548 btl->AddLoginTimeMarker("TPMOwn-End", false); |
548 } | 549 } |
549 | 550 |
| 551 // Enable/disable plugins based on user preferences. |
| 552 PluginUpdater::GetInstance()->SetProfile(user_profile); |
| 553 |
550 // We suck. This is a hack since we do not have the enterprise feature | 554 // We suck. This is a hack since we do not have the enterprise feature |
551 // done yet to pull down policies from the domain admin. We'll take this | 555 // done yet to pull down policies from the domain admin. We'll take this |
552 // out when we get that done properly. | 556 // out when we get that done properly. |
553 // TODO(xiyuan): Remove this once enterprise feature is ready. | 557 // TODO(xiyuan): Remove this once enterprise feature is ready. |
554 if (EndsWith(username_, "@google.com", true)) { | 558 if (EndsWith(username_, "@google.com", true)) { |
555 PrefService* pref_service = user_profile->GetPrefs(); | 559 PrefService* pref_service = user_profile->GetPrefs(); |
556 pref_service->SetBoolean(prefs::kEnableScreenLock, true); | 560 pref_service->SetBoolean(prefs::kEnableScreenLock, true); |
557 } | 561 } |
558 | 562 |
559 user_profile->OnLogin(); | 563 user_profile->OnLogin(); |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 // Mark login host for deletion after browser starts. This | 985 // Mark login host for deletion after browser starts. This |
982 // guarantees that the message loop will be referenced by the | 986 // guarantees that the message loop will be referenced by the |
983 // browser before it is dereferenced by the login host. | 987 // browser before it is dereferenced by the login host. |
984 if (login_host) { | 988 if (login_host) { |
985 login_host->OnSessionStart(); | 989 login_host->OnSessionStart(); |
986 login_host = NULL; | 990 login_host = NULL; |
987 } | 991 } |
988 } | 992 } |
989 | 993 |
990 } // namespace chromeos | 994 } // namespace chromeos |
OLD | NEW |