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

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

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Chrome, webkit, remoting and crypto/owners Created 9 years, 8 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/user_manager.h" 5 #include "chrome/browser/chromeos/login/user_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/nss_util.h"
14 #include "base/path_service.h" 13 #include "base/path_service.h"
15 #include "base/string_util.h" 14 #include "base/string_util.h"
16 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
17 #include "base/time.h" 16 #include "base/time.h"
18 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
19 #include "base/values.h" 18 #include "base/values.h"
19 #include "crypto/nss_util.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chromeos/cros/cros_library.h" 21 #include "chrome/browser/chromeos/cros/cros_library.h"
22 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 22 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
23 #include "chrome/browser/chromeos/cros/input_method_library.h" 23 #include "chrome/browser/chromeos/cros/input_method_library.h"
24 #include "chrome/browser/chromeos/login/login_display.h" 24 #include "chrome/browser/chromeos/login/login_display.h"
25 #include "chrome/browser/chromeos/login/ownership_service.h" 25 #include "chrome/browser/chromeos/login/ownership_service.h"
26 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 26 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
27 #include "chrome/browser/chromeos/wm_ipc.h" 27 #include "chrome/browser/chromeos/wm_ipc.h"
28 #include "chrome/browser/defaults.h" 28 #include "chrome/browser/defaults.h"
29 #include "chrome/browser/prefs/pref_service.h" 29 #include "chrome/browser/prefs/pref_service.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 Details<const User>(&logged_in_user_)); 563 Details<const User>(&logged_in_user_));
564 564
565 chromeos::CrosLibrary::Get()->GetInputMethodLibrary()-> 565 chromeos::CrosLibrary::Get()->GetInputMethodLibrary()->
566 SetDeferImeStartup(false); 566 SetDeferImeStartup(false);
567 // Shut down the IME so that it will reload the user's settings. 567 // Shut down the IME so that it will reload the user's settings.
568 chromeos::CrosLibrary::Get()->GetInputMethodLibrary()-> 568 chromeos::CrosLibrary::Get()->GetInputMethodLibrary()->
569 StopInputMethodDaemon(); 569 StopInputMethodDaemon();
570 // Let the window manager know that we're logged in now. 570 // Let the window manager know that we're logged in now.
571 WmIpc::instance()->SetLoggedInProperty(true); 571 WmIpc::instance()->SetLoggedInProperty(true);
572 // Ensure we've opened the real user's key/certificate database. 572 // Ensure we've opened the real user's key/certificate database.
573 base::OpenPersistentNSSDB(); 573 crypto::OpenPersistentNSSDB();
574 574
575 // Only load the Opencryptoki library into NSS if we have this switch. 575 // Only load the Opencryptoki library into NSS if we have this switch.
576 // TODO(gspencer): Remove this switch once cryptohomed work is finished: 576 // TODO(gspencer): Remove this switch once cryptohomed work is finished:
577 // http://crosbug.com/12295 and http://crosbug.com/12304 577 // http://crosbug.com/12295 and http://crosbug.com/12304
578 if (CommandLine::ForCurrentProcess()->HasSwitch( 578 if (CommandLine::ForCurrentProcess()->HasSwitch(
579 switches::kLoadOpencryptoki)) { 579 switches::kLoadOpencryptoki)) {
580 base::EnableTPMForNSS(); 580 base::EnableTPMForNSS();
581 } 581 }
582 582
583 // Schedules current user ownership check on file thread. 583 // Schedules current user ownership check on file thread.
(...skipping 14 matching lines...) Expand all
598 base::AutoLock lk(current_user_is_owner_lock_); 598 base::AutoLock lk(current_user_is_owner_lock_);
599 return current_user_is_owner_; 599 return current_user_is_owner_;
600 } 600 }
601 601
602 void UserManager::set_current_user_is_owner(bool current_user_is_owner) { 602 void UserManager::set_current_user_is_owner(bool current_user_is_owner) {
603 base::AutoLock lk(current_user_is_owner_lock_); 603 base::AutoLock lk(current_user_is_owner_lock_);
604 current_user_is_owner_ = current_user_is_owner; 604 current_user_is_owner_ = current_user_is_owner;
605 } 605 }
606 606
607 } // namespace chromeos 607 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698