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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 ProfileMetrics::DELETE_PROFILE_EVENT); 942 ProfileMetrics::DELETE_PROFILE_EVENT);
943 } 943 }
944 944
945 // static 945 // static
946 bool ProfileManager::IsMultipleProfilesEnabled() { 946 bool ProfileManager::IsMultipleProfilesEnabled() {
947 #if defined(OS_CHROMEOS) 947 #if defined(OS_CHROMEOS)
948 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles)) 948 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles))
949 return false; 949 return false;
950 #endif 950 #endif
951 #if defined(OS_WIN) 951 #if defined(OS_WIN)
952 if (base::win::GetMetroModule()) 952 if (base::win::IsMetroProcess())
953 return false; 953 return false;
954 #endif 954 #endif
955 return !ManagedMode::IsInManagedMode(); 955 return !ManagedMode::IsInManagedMode();
956 } 956 }
957 957
958 void ProfileManager::AutoloadProfiles() { 958 void ProfileManager::AutoloadProfiles() {
959 ProfileInfoCache& cache = GetProfileInfoCache(); 959 ProfileInfoCache& cache = GetProfileInfoCache();
960 size_t number_of_profiles = cache.GetNumberOfProfiles(); 960 size_t number_of_profiles = cache.GetNumberOfProfiles();
961 for (size_t p = 0; p < number_of_profiles; ++p) { 961 for (size_t p = 0; p < number_of_profiles; ++p) {
962 if (cache.GetBackgroundStatusOfProfileAtIndex(p)) { 962 if (cache.GetBackgroundStatusOfProfileAtIndex(p)) {
(...skipping 23 matching lines...) Expand all
986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, 986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks,
987 Profile* profile, 987 Profile* profile,
988 Profile::CreateStatus status) { 988 Profile::CreateStatus status) {
989 for (size_t i = 0; i < callbacks.size(); ++i) 989 for (size_t i = 0; i < callbacks.size(); ++i)
990 callbacks[i].Run(profile, status); 990 callbacks[i].Run(profile, status);
991 } 991 }
992 992
993 ProfileManager::ProfileInfo::~ProfileInfo() { 993 ProfileManager::ProfileInfo::~ProfileInfo() {
994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); 994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release());
995 } 995 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service_win.cc ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698