Chromium Code Reviews| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 } | 416 } |
| 417 } | 417 } |
| 418 | 418 |
| 419 void ProfileManager::Observe( | 419 void ProfileManager::Observe( |
| 420 int type, | 420 int type, |
| 421 const content::NotificationSource& source, | 421 const content::NotificationSource& source, |
| 422 const content::NotificationDetails& details) { | 422 const content::NotificationDetails& details) { |
| 423 #if defined(OS_CHROMEOS) | 423 #if defined(OS_CHROMEOS) |
| 424 if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) { | 424 if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) { |
| 425 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 425 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 426 if (chromeos::CrosLibrary::Get()->EnsureLoaded() && | 426 if (chromeos::CrosLibrary::Get()->libcros_loaded() && |
|
satorux1
2011/11/16 23:51:34
I think we don't need this, as chromeos::CrosLibra
stevenjb
2011/11/17 00:23:33
Double checked that IsMounted() returns |true| in
| |
| 427 !command_line.HasSwitch(switches::kTestType)) { | 427 !command_line.HasSwitch(switches::kTestType)) { |
| 428 // If we don't have a mounted profile directory we're in trouble. | 428 // If we don't have a mounted profile directory we're in trouble. |
| 429 // TODO(davemoore) Once we have better api this check should ensure that | 429 // TODO(davemoore) Once we have better api this check should ensure that |
| 430 // our profile directory is the one that's mounted, and that it's mounted | 430 // our profile directory is the one that's mounted, and that it's mounted |
| 431 // as the current user. | 431 // as the current user. |
| 432 CHECK(chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()->IsMounted()); | 432 CHECK(chromeos::CrosLibrary::Get()->GetCryptohomeLibrary()->IsMounted()); |
| 433 } | 433 } |
| 434 logged_in_ = true; | 434 logged_in_ = true; |
| 435 } | 435 } |
| 436 #endif | 436 #endif |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 677 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 677 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 678 const FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 678 const FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 679 } | 679 } |
| 680 | 680 |
| 681 void ProfileManager::RegisterTestingProfile(Profile* profile, | 681 void ProfileManager::RegisterTestingProfile(Profile* profile, |
| 682 bool add_to_cache) { | 682 bool add_to_cache) { |
| 683 RegisterProfile(profile, true); | 683 RegisterProfile(profile, true); |
| 684 if (add_to_cache) | 684 if (add_to_cache) |
| 685 AddProfileToCache(profile); | 685 AddProfileToCache(profile); |
| 686 } | 686 } |
| OLD | NEW |