| OLD | NEW |
| 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/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 base::Time end) { | 176 base::Time end) { |
| 177 // BrowsingDataRemover deletes itself when it's done. | 177 // BrowsingDataRemover deletes itself when it's done. |
| 178 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForRange( | 178 BrowsingDataRemover* remover = BrowsingDataRemover::CreateForRange( |
| 179 profile, start, end); | 179 profile, start, end); |
| 180 if (observer) | 180 if (observer) |
| 181 remover->AddObserver(observer); | 181 remover->AddObserver(observer); |
| 182 remover->Remove(BrowsingDataRemover::REMOVE_ALL, | 182 remover->Remove(BrowsingDataRemover::REMOVE_ALL, |
| 183 BrowsingDataHelper::ALL); | 183 BrowsingDataHelper::ALL); |
| 184 | 184 |
| 185 scoped_refptr<password_manager::PasswordStore> password = | 185 scoped_refptr<password_manager::PasswordStore> password = |
| 186 PasswordStoreFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS); | 186 PasswordStoreFactory::GetForProfile(profile, |
| 187 ServiceAccessType::EXPLICIT_ACCESS); |
| 187 password->RemoveLoginsSyncedBetween(start, end); | 188 password->RemoveLoginsSyncedBetween(start, end); |
| 188 } | 189 } |
| 189 | 190 |
| 190 // Perform the actual sync data folder deletion. | 191 // Perform the actual sync data folder deletion. |
| 191 // This should only be called on the sync thread. | 192 // This should only be called on the sync thread. |
| 192 void DeleteSyncDataFolder(const base::FilePath& directory_path) { | 193 void DeleteSyncDataFolder(const base::FilePath& directory_path) { |
| 193 if (base::DirectoryExists(directory_path)) { | 194 if (base::DirectoryExists(directory_path)) { |
| 194 if (!base::DeleteFile(directory_path, true)) | 195 if (!base::DeleteFile(directory_path, true)) |
| 195 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 196 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
| 196 } | 197 } |
| (...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2756 | 2757 |
| 2757 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { | 2758 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { |
| 2758 if (sync_thread_) { | 2759 if (sync_thread_) { |
| 2759 return sync_thread_->message_loop(); | 2760 return sync_thread_->message_loop(); |
| 2760 } else if (backend_) { | 2761 } else if (backend_) { |
| 2761 return backend_->GetSyncLoopForTesting(); | 2762 return backend_->GetSyncLoopForTesting(); |
| 2762 } else { | 2763 } else { |
| 2763 return NULL; | 2764 return NULL; |
| 2764 } | 2765 } |
| 2765 } | 2766 } |
| OLD | NEW |