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

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

Issue 1072413003: Add foundation for trimming the AffiliationDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 <set> 7 #include <set>
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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 } 1192 }
1193 1193
1194 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex( 1194 bool profile_is_signed_in = !cache.GetUserNameOfProfileAtIndex(
1195 cache.GetIndexOfProfileWithPath(profile_dir)).empty(); 1195 cache.GetIndexOfProfileWithPath(profile_dir)).empty();
1196 ProfileMetrics::LogProfileDelete(profile_is_signed_in); 1196 ProfileMetrics::LogProfileDelete(profile_is_signed_in);
1197 // Some platforms store passwords in keychains. They should be removed. 1197 // Some platforms store passwords in keychains. They should be removed.
1198 scoped_refptr<password_manager::PasswordStore> password_store = 1198 scoped_refptr<password_manager::PasswordStore> password_store =
1199 PasswordStoreFactory::GetForProfile( 1199 PasswordStoreFactory::GetForProfile(
1200 profile, ServiceAccessType::EXPLICIT_ACCESS).get(); 1200 profile, ServiceAccessType::EXPLICIT_ACCESS).get();
1201 if (password_store.get()) { 1201 if (password_store.get()) {
1202 password_store->RemoveLoginsCreatedBetween(base::Time(), 1202 password_store->RemoveLoginsCreatedBetween(
1203 base::Time::Max()); 1203 base::Time(), base::Time::Max(), base::Closure());
1204 } 1204 }
1205 } 1205 }
1206 1206
1207 QueueProfileDirectoryForDeletion(profile_dir); 1207 QueueProfileDirectoryForDeletion(profile_dir);
1208 cache.DeleteProfileFromCache(profile_dir); 1208 cache.DeleteProfileFromCache(profile_dir);
1209 ProfileMetrics::UpdateReportedProfilesStatistics(this); 1209 ProfileMetrics::UpdateReportedProfilesStatistics(this);
1210 } 1210 }
1211 1211
1212 ProfileManager::ProfileInfo* ProfileManager::RegisterProfile( 1212 ProfileManager::ProfileInfo* ProfileManager::RegisterProfile(
1213 Profile* profile, 1213 Profile* profile,
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 } 1398 }
1399 1399
1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1401 if (!original_callback.is_null()) 1401 if (!original_callback.is_null())
1402 original_callback.Run(loaded_profile, status); 1402 original_callback.Run(loaded_profile, status);
1403 } 1403 }
1404 1404
1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1407 } 1407 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698