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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 7564006: Rename PluginUpdater to PluginPrefs and make it per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add static initialization again Created 9 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) 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
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"
45 #include "chrome/browser/policy/browser_policy_connector.h" 44 #include "chrome/browser/policy/browser_policy_connector.h"
46 #include "chrome/browser/prefs/pref_member.h" 45 #include "chrome/browser/prefs/pref_member.h"
47 #include "chrome/browser/profiles/profile.h" 46 #include "chrome/browser/profiles/profile.h"
48 #include "chrome/browser/profiles/profile_manager.h" 47 #include "chrome/browser/profiles/profile_manager.h"
49 #include "chrome/browser/sync/profile_sync_service.h" 48 #include "chrome/browser/sync/profile_sync_service.h"
50 #include "chrome/browser/ui/browser_init.h" 49 #include "chrome/browser/ui/browser_init.h"
51 #include "chrome/common/chrome_paths.h" 50 #include "chrome/common/chrome_paths.h"
52 #include "chrome/common/chrome_switches.h" 51 #include "chrome/common/chrome_switches.h"
53 #include "chrome/common/logging_chrome.h" 52 #include "chrome/common/logging_chrome.h"
54 #include "chrome/common/net/gaia/gaia_constants.h" 53 #include "chrome/common/net/gaia/gaia_constants.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { 536 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) {
538 if (cryptohome->TpmIsOwned()) { 537 if (cryptohome->TpmIsOwned()) {
539 cryptohome->TpmClearStoredPassword(); 538 cryptohome->TpmClearStoredPassword();
540 } else { 539 } else {
541 cryptohome->TpmCanAttemptOwnership(); 540 cryptohome->TpmCanAttemptOwnership();
542 } 541 }
543 } 542 }
544 btl->AddLoginTimeMarker("TPMOwn-End", false); 543 btl->AddLoginTimeMarker("TPMOwn-End", false);
545 } 544 }
546 545
547 // Enable/disable plugins based on user preferences.
548 PluginUpdater::GetInstance()->SetProfile(user_profile);
549
550 // We suck. This is a hack since we do not have the enterprise feature 546 // 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 547 // done yet to pull down policies from the domain admin. We'll take this
552 // out when we get that done properly. 548 // out when we get that done properly.
553 // TODO(xiyuan): Remove this once enterprise feature is ready. 549 // TODO(xiyuan): Remove this once enterprise feature is ready.
554 if (EndsWith(username_, "@google.com", true)) { 550 if (EndsWith(username_, "@google.com", true)) {
555 PrefService* pref_service = user_profile->GetPrefs(); 551 PrefService* pref_service = user_profile->GetPrefs();
556 pref_service->SetBoolean(prefs::kEnableScreenLock, true); 552 pref_service->SetBoolean(prefs::kEnableScreenLock, true);
557 } 553 }
558 554
559 user_profile->OnLogin(); 555 user_profile->OnLogin();
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 // Mark login host for deletion after browser starts. This 951 // Mark login host for deletion after browser starts. This
956 // guarantees that the message loop will be referenced by the 952 // guarantees that the message loop will be referenced by the
957 // browser before it is dereferenced by the login host. 953 // browser before it is dereferenced by the login host.
958 if (login_host) { 954 if (login_host) {
959 login_host->OnSessionStart(); 955 login_host->OnSessionStart();
960 login_host = NULL; 956 login_host = NULL;
961 } 957 }
962 } 958 }
963 959
964 } // namespace chromeos 960 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698