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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 Profile* profile = GetProfileByPath(profile_dir); | 566 Profile* profile = GetProfileByPath(profile_dir); |
567 if (profile) | 567 if (profile) |
568 BrowserList::CloseAllBrowsersWithProfile(profile); | 568 BrowserList::CloseAllBrowsersWithProfile(profile); |
569 profiles_to_delete_.push_back(profile_dir); | 569 profiles_to_delete_.push_back(profile_dir); |
570 ProfileInfoCache& cache = GetProfileInfoCache(); | 570 ProfileInfoCache& cache = GetProfileInfoCache(); |
571 cache.DeleteProfileFromCache(profile_dir); | 571 cache.DeleteProfileFromCache(profile_dir); |
572 } | 572 } |
573 | 573 |
574 // static | 574 // static |
575 bool ProfileManager::IsMultipleProfilesEnabled() { | 575 bool ProfileManager::IsMultipleProfilesEnabled() { |
576 #if defined(OS_MACOSX) || (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) | |
577 return true; | |
578 #else | |
576 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); | 579 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); |
580 #endif | |
577 } | 581 } |
578 | 582 |
579 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 583 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
580 const FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 584 const FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
581 } | 585 } |
586 | |
587 void ProfileManager::RegisterTestingProfile(Profile* profile, | |
588 bool addToCache) { | |
Robert Sesek
2011/09/12 14:02:16
Should be add_to_cache
| |
589 RegisterProfile(profile, true); | |
590 if (addToCache) | |
591 AddProfileToCache(profile); | |
592 } | |
OLD | NEW |