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

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

Issue 2654443002: Should not gather statistics for a system profile. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/profiles/profile_manager.h" 5 #include "chrome/browser/profiles/profile_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 // Do nothing if the profile is already being deleted. 1663 // Do nothing if the profile is already being deleted.
1664 } else if (profile->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles)) { 1664 } else if (profile->GetPrefs()->GetBoolean(prefs::kForceEphemeralProfiles)) {
1665 // Delete if the profile is an ephemeral profile. 1665 // Delete if the profile is an ephemeral profile.
1666 g_browser_process->profile_manager()->ScheduleProfileForDeletion( 1666 g_browser_process->profile_manager()->ScheduleProfileForDeletion(
1667 path, ProfileManager::CreateCallback()); 1667 path, ProfileManager::CreateCallback());
1668 } else { 1668 } else {
1669 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) 1669 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
1670 // Gather statistics and store into ProfileInfoCache. For incognito profile 1670 // Gather statistics and store into ProfileInfoCache. For incognito profile
1671 // we gather the statistics of its parent profile instead, because a window 1671 // we gather the statistics of its parent profile instead, because a window
1672 // of the parent profile was open. 1672 // of the parent profile was open.
1673 if (!profile->IsSystemProfile()) { 1673 if (!profile->IsSystemProfile() && !original_profile->IsSystemProfile()) {
1674 ProfileStatisticsFactory::GetForProfile(original_profile)-> 1674 ProfileStatisticsFactory::GetForProfile(original_profile)->
1675 GatherStatistics(profiles::ProfileStatisticsCallback()); 1675 GatherStatistics(profiles::ProfileStatisticsCallback());
1676 } 1676 }
1677 #endif 1677 #endif
1678 } 1678 }
1679 } 1679 }
1680 1680
1681 void ProfileManager::BrowserListObserver::OnBrowserSetLastActive( 1681 void ProfileManager::BrowserListObserver::OnBrowserSetLastActive(
1682 Browser* browser) { 1682 Browser* browser) {
1683 // If all browsers are being closed (e.g. the user is in the process of 1683 // If all browsers are being closed (e.g. the user is in the process of
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 1721
1722 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1722 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1723 if (!original_callback.is_null()) 1723 if (!original_callback.is_null())
1724 original_callback.Run(loaded_profile, status); 1724 original_callback.Run(loaded_profile, status);
1725 } 1725 }
1726 #endif // !defined(OS_ANDROID) 1726 #endif // !defined(OS_ANDROID)
1727 1727
1728 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1728 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1729 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1729 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1730 } 1730 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698