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